beginning to work on the thumbnail

zoom
Yanick Champoux 2018-01-09 19:17:30 -05:00
parent 2a63b777f7
commit e2410ecc24
2 changed files with 9 additions and 6 deletions

View File

@ -31,7 +31,7 @@ let props = {
, eventsListenerElement: { }
};
export default {
export const SvgPanZoom = {
props,
mounted: function() {
let options = {};
@ -39,6 +39,11 @@ export default {
Object.keys(props).filter( k => this[k] !== undefined ).forEach( k => options[k] = this[k] );
console.log(options);
svg_pan_zoom( this.$slots.default[0].elm , options );
// svg_pan_zoom( '#mainView', options );
},
};
export default SvgPanZoom;
export const SvgPanZoomThumbnail = {};
</script>

View File

@ -2,19 +2,17 @@
<SvgPanZoom
style="width: 300px; height: 500px; border:1px solid black; "
>
<embed id="mainView" type="image/svg+xml" src="tiger.svg"/>
<SvgPanZoomThumbnail>
<embed id="mainView" type="image/svg+xml" src="tiger.svg"/>
</SvgPanZoomThumbnail>
<RawTiger />
</SvgPanZoom>
</template>
<script>
import { SvgPanZoom, SvgPanZoomThumbnail } from './index.vue';
import RawTiger from './RawTiger.vue';
export default {
components: { SvgPanZoom, SvgPanZoomThumbnail },
components: { SvgPanZoom, RawTiger },
};
</script>