@@ -13,6 +13,7 @@ import ContentTypeConfigInterface from "../../content-type-config.d";
13
13
import ConditionalRemoveOption from "../../content-type-menu/conditional-remove-option" ;
14
14
import { OptionsInterface } from "../../content-type-menu/option.d" ;
15
15
import ContentTypeInterface from "../../content-type.d" ;
16
+ import DataStore from "../../data-store" ;
16
17
import ContentTypeMountEventParamsInterface from "../content-type-mount-event-params.d" ;
17
18
import ContentTypeReadyEventParamsInterface from "../content-type-ready-event-params.d" ;
18
19
import ObservableUpdater from "../observable-updater" ;
@@ -48,10 +49,10 @@ export default class Preview extends PreviewCollection {
48
49
jarallax (
49
50
this . element ,
50
51
{
51
- imgPosition : this . data . inner . style ( ) . backgroundPosition || "50% 50%" ,
52
- imgRepeat : this . data . inner . style ( ) . backgroundRepeat === "0" ? "no- repeat" : " repeat",
53
- imgSize : this . data . inner . style ( ) . backgroundSize || "cover" ,
54
- speed : this . data . inner . attributes ( ) [ "data-parallax-speed" ] || 0.5 ,
52
+ imgPosition : this . parent . dataStore . get ( "background_position" ) as string || "50% 50%" ,
53
+ imgRepeat : this . parent . dataStore . get ( "background_repeat" ) as " repeat" | "no- repeat",
54
+ imgSize : this . parent . dataStore . get ( "background_size" ) as string || "cover" ,
55
+ speed : Number . parseFloat ( this . parent . dataStore . get ( "parallax_speed" ) as string ) || 0.5 ,
55
56
} ,
56
57
) ;
57
58
jarallax ( this . element , "onResize" ) ;
0 commit comments