You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/test/js/samples/inline-style-optimized-mult.../expected.js

63 lines
1.3 KiB

/* generated by Svelte vX.Y.Z */
import {
SvelteComponent,
detach,
element,
init,
insert,
noop,
safe_not_equal,
set_style
} from "svelte/internal";
function create_fragment(ctx) {
let div;
return {
c() {
div = element("div");
set_style(div, "color", /*color*/ ctx[0]);
set_style(div, "transform", "translate(" + /*x*/ ctx[1] + "px," + /*y*/ ctx[2] + "px)");
},
m(target, anchor) {
insert(target, div, anchor);
},
p(ctx, [dirty]) {
if (dirty & /*color*/ 1) {
set_style(div, "color", /*color*/ ctx[0]);
}
if (dirty & /*x, y*/ 6) {
set_style(div, "transform", "translate(" + /*x*/ ctx[1] + "px," + /*y*/ ctx[2] + "px)");
}
},
i: noop,
o: noop,
d(detaching) {
if (detaching) detach(div);
}
};
}
function instance($$self, $$props, $$invalidate) {
let { color } = $$props;
let { x } = $$props;
let { y } = $$props;
$$self.$$set = $$props => {
if ('color' in $$props) $$invalidate(0, color = $$props.color);
if ('x' in $$props) $$invalidate(1, x = $$props.x);
if ('y' in $$props) $$invalidate(2, y = $$props.y);
};
return [color, x, y];
}
class Component extends SvelteComponent {
constructor(options) {
super();
init(this, options, instance, create_fragment, safe_not_equal, { color: 0, x: 1, y: 2 });
}
}
export default Component;