discourse/app/assets/javascripts/wizard/addon/components/image-preview-large-icon.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

28 lines
595 B
JavaScript
Raw Normal View History

import { observes } from "discourse-common/utils/decorators";
import WizardPreviewBaseComponent from "./wizard-preview-base";
2016-09-19 14:24:37 -04:00
export default WizardPreviewBaseComponent.extend({
width: 325,
height: 125,
2016-09-19 14:24:37 -04:00
ios: null,
image: null,
@observes("field.value")
imageChanged() {
this.reload();
},
images() {
return {
ios: "/images/wizard/apple-mask.png",
image: this.get("field.value"),
};
2016-09-19 14:24:37 -04:00
},
paint(options) {
const { width, height } = options;
this.scaleImage(this.image, 10, 8, 87, 87);
this.scaleImage(this.ios, 0, 0, width, height);
2016-09-19 14:24:37 -04:00
},
});