minor style fix

This commit is contained in:
Alessio Carrafa 2019-09-26 17:51:00 +02:00
parent 7165a1feff
commit aba8972657

View File

@ -11,39 +11,10 @@
<slot class="thumbnail" />
</SPZ>
<Scope :bus="bus" :mainSPZ="mainSPZ" :thumbnailSPZ="thumbnailSPZ" />
</div>
</div>
</template>
<script>
import Scope from './Scope.vue';
export default {
props: [ 'onThumbnailShown', 'mainSPZ', 'bus' ],
beforeCreate: function () {
this.$options.components.SPZ = require('./SvgPanZoom.vue').default
},
methods: {
zoomMain(evt) {
this.mainSPZ[ event.deltaY < 0 ? 'zoomIn' : 'zoomOut' ]();
},
thumbnailSPZcreated(spz) {
this.thumbnailSPZ = spz;
this.bus.$emit( 'thumbnailCreated', spz );
},
},
mounted() {
if( this.onThumbnailShown ) {
this.onThumbnailShown();
}
},
components: { Scope },
data: () => ({ thumbnailSPZ: null })
};
</script>
<style>
.thumbView {
z-index: 110;
background: white;
@ -65,5 +36,31 @@ export default {
width: 100% !important;
height: 100% !important;
}
</style>
<script>
import Scope from './Scope.vue';
export default {
components: { Scope },
props: [ 'onThumbnailShown', 'mainSPZ', 'bus' ],
data: () => ({ thumbnailSPZ: null }),
beforeCreate: function () {
this.$options.components.SPZ = require('./SvgPanZoom.vue').default
},
methods: {
zoomMain(evt) {
this.mainSPZ[ event.deltaY < 0 ? 'zoomIn' : 'zoomOut' ]();
},
thumbnailSPZcreated(spz) {
this.thumbnailSPZ = spz;
this.bus.$emit( 'thumbnailCreated', spz );
},
},
mounted() {
if( this.onThumbnailShown ) {
this.onThumbnailShown();
}
}
};
</script>