mirror of
https://github.com/discourse/discourse.git
synced 2024-12-16 20:53:44 +08:00
22 lines
529 B
JavaScript
22 lines
529 B
JavaScript
import { observes } from 'ember-addons/ember-computed-decorators';
|
|
import { createPreviewComponent } from 'wizard/lib/preview';
|
|
|
|
export default createPreviewComponent(325, 125, {
|
|
ios: null,
|
|
image: null,
|
|
|
|
@observes('field.value')
|
|
imageChanged() {
|
|
this.reload();
|
|
},
|
|
|
|
images() {
|
|
return { ios: '/images/wizard/apple-mask.png', image: this.get('field.value') };
|
|
},
|
|
|
|
paint(ctx, colors, width, height) {
|
|
this.scaleImage(this.image, 10, 8, 87, 87);
|
|
this.scaleImage(this.ios, 0, 0, width, height);
|
|
}
|
|
});
|