]> _ Git - fluidbook-html5.git/commitdiff
wip #3901 @0.25
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 21 Sep 2020 13:56:58 +0000 (15:56 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 21 Sep 2020 13:56:58 +0000 (15:56 +0200)
js/libs/fluidbook/links/fluidbook.links.zoom.js

index 29c968ee381dbb8588ec79881ee63446643590f3..84c527f4665f59b2c5bbc160d22ea741f9701c0d 100644 (file)
@@ -238,8 +238,7 @@ FluidbookLinksZoom.prototype = {
                 return;
             }
 
-            var linkId = $(parent).attr('id').split('_', 2)[1];
-            var zoomImage = 'data/links/zoom_' + linkId + '.jpg';
+            var zoomImage = 'data/links/zoom_' + $(parent).data('id') + '.jpg';
 
             // TODO: In the compiler we should look at generating higher-res images to cater for hiDPI displays
             // TODO: It should be clearer what the sizes in the link editor really mean - due to screen size and scaling, a 100x100 link could appear as 150x150 in the player so if it we set a max zoom level of 2, it will only appear at 200x200, which is not much bigger than the embedded size. It's hard to handle max zoom levels while also working with a player that always scales the content to fit the screen. The most pragmatic approach probably is to generate higher res images.