-
-
Notifications
You must be signed in to change notification settings - Fork 222
Open
Description
After a few tweaks, this script works perfectly.
I have made some changes to my copy of the code to allow an image that is not displayed at natural dimensions to have its map resized.
var scalingFactor = {
// width : image.width / image.naturalWidth,
// height : image.height / image.naturalHeight
width: window.innerWidth / origwindowwidth,
height: window.innerHeight / origwindowheight
};
...
var
/*jshint validthis:true */
map = this,
areas = null, cachedAreaCoordsArray = null, image = null, timer = null,
origwindowwidth = window.innerWidth,
origwindowheight = window.innerHeight;
This works for me.
You could probably refine this to work individual images with origimageheight as a variable in the map and use the image.height on startup if you had multiple maps that could be independently resized.
Thought I'd share.
Kevin.
Metadata
Metadata
Assignees
Labels
No labels