File tree 2 files changed +17
-0
lines changed
addons/website/static/src/builder/plugins
2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import { ImageShapeOption } from "./image_shape_option";
3
3
import { ImageFilterOption } from "./image_filter_option" ;
4
4
import { ImageFormatOption } from "./image_format_option" ;
5
5
import { ImageTransformButton } from "./image_transform_button" ;
6
+ import { useDomState } from "@html_builder/core/utils" ;
6
7
7
8
export class ImageToolOption extends BaseOptionComponent {
8
9
static template = "html_builder.ImageToolOption" ;
@@ -13,4 +14,10 @@ export class ImageToolOption extends BaseOptionComponent {
13
14
ImageTransformButton,
14
15
} ;
15
16
static props = { } ;
17
+ setup ( ) {
18
+ super . setup ( ) ;
19
+ this . state = useDomState ( ( editingElement ) => {
20
+ return { isImageAnimated : editingElement . classList . contains ( "o_animate" ) } ;
21
+ } ) ;
22
+ }
16
23
}
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2
+ <templates xml : space =" preserve" >
3
+
4
+ <t t-name =" html_builder.ImageToolOptionAnimateOption" t-inherit =" html_builder.ImageToolOption" t-inherit-mode =" extension" >
5
+ <xpath expr =" //ImageTransformButton[@id=" 'transformImage'" ]" position =" attributes" >
6
+ <attribute name =" t-if" >!this.state.isImageAnimated</attribute >
7
+ </xpath >
8
+ </t >
9
+
10
+ </templates >
You can’t perform that action at this time.
0 commit comments