jamietre/ImageMapster — Issue #40: memory hog during rebind/set
Author: ryanscode
Created: 2012-01-24 11:47:45+00:00
State: open

As I understand, set_options doesn't update the 'view'. Rebind does that.

I have an image map with 20 areas.
I need to have some of them in a 'selected' state and with different fillColors (based on some logic)

So I do a 'set_options' with {areas: [{key: k, fillColor: color, selected: true}]}; and then call $(this).mapster('set',true); This causes way too much memory (around 200MB) to get allocated by the browser (but which falls back to normal after 5-6 seconds)

I've tried doing a 'rebind' with the same {areas[]} object, but the result is the same.

Is there a non-memory intensive way of setting the fillColor and 'selected=true' to take effect immediately ?