|
|
@ -1,4 +1,4 @@
|
|
|
|
import { assign, createElement, detachNode, insertNode, noop, proto } from "svelte/shared.js";
|
|
|
|
import { assign, createElement, detachNode, insertNode, noop, proto, setStyle } from "svelte/shared.js";
|
|
|
|
|
|
|
|
|
|
|
|
function create_main_fragment ( state, component ) {
|
|
|
|
function create_main_fragment ( state, component ) {
|
|
|
|
var div;
|
|
|
|
var div;
|
|
|
@ -10,8 +10,8 @@ function create_main_fragment ( state, component ) {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
hydrate: function ( nodes ) {
|
|
|
|
hydrate: function ( nodes ) {
|
|
|
|
div.style.setProperty('color', state.color);
|
|
|
|
setStyle(div, 'color', state.color);
|
|
|
|
div.style.setProperty('transform', "translate(" + state.x + "px," + state.y + "px)");
|
|
|
|
setStyle(div, 'transform', "translate(" + state.x + "px," + state.y + "px)");
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
mount: function ( target, anchor ) {
|
|
|
|
mount: function ( target, anchor ) {
|
|
|
@ -20,11 +20,11 @@ function create_main_fragment ( state, component ) {
|
|
|
|
|
|
|
|
|
|
|
|
update: function ( changed, state ) {
|
|
|
|
update: function ( changed, state ) {
|
|
|
|
if ( changed.color ) {
|
|
|
|
if ( changed.color ) {
|
|
|
|
div.style.setProperty('color', state.color);
|
|
|
|
setStyle(div, 'color', state.color);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if ( changed.x || changed.y ) {
|
|
|
|
if ( changed.x || changed.y ) {
|
|
|
|
div.style.setProperty('transform', "translate(" + state.x + "px," + state.y + "px)");
|
|
|
|
setStyle(div, 'transform', "translate(" + state.x + "px," + state.y + "px)");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|