beginning to work on the thumbnail

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

View File

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