FIX: Regression with wizard canvas elements

This commit is contained in:
Penar Musaraj 2020-02-12 12:31:15 -05:00
parent 453bec9394
commit 52fe5b938c
2 changed files with 1 additions and 5 deletions

View File

@ -6,7 +6,6 @@ import {
chooseDarker,
LOREM
} from "wizard/lib/preview";
import { computed } from "@ember/object";
export default createPreviewComponent(305, 165, {
logo: null,
@ -14,10 +13,6 @@ export default createPreviewComponent(305, 165, {
classNameBindings: ["isSelected"],
canvasStyle: computed("width", "height", function() {
return `width:${this.width}px;height:${this.height}px`.htmlSafe();
}),
@discourseComputed("selectedId", "colorsId")
isSelected(selectedId, colorsId) {
return selectedId === colorsId;

View File

@ -41,6 +41,7 @@ export function createPreviewComponent(width, height, obj) {
height,
elementWidth: width * scale,
elementHeight: height * scale,
canvasStyle: `width:${width}px;height:${height}px`,
ctx: null,
loaded: false,