Image adjusting in open() method

37 views
Skip to first unread message

Veli

unread,
Jan 31, 2018, 2:32:23 PM1/31/18
to FancyBox
Hi there,

we use fancy box for displaying images from 3D visualization (after hotspot click) in this way

$.fancybox.open('<img src="/path/to/image.jpg" />');

this works great but big images are not resized/autoscaled to fit the screen

Any tips how to adjust image screen through js?

I tried something like

$.fancybox.open({
     content: '<img src="/path/to/image.jpg" />'
});

to setup options but it fails with The requested content cannot be loaded

Thanks 

Veli

unread,
Feb 1, 2018, 12:59:25 PM2/1/18
to FancyBox
$.fancybox.open([ { src: '/path/to/image.jpg', type: 'image' }]);

this sorts my problem ..


Dne středa 31. ledna 2018 20:32:23 UTC+1 Veli napsal(a):
Reply all
Reply to author
Forward
0 new messages