timeglider / jquery_widget

Timeglider's JS Widget component. See README for details.
193 stars 41 forks source link

Trouble instantiating multiple instances of timeline widget #40

Open framejk opened 12 years ago

framejk commented 12 years ago

Trying to have multiple timeline widgets loaded into a single page. The last timeload will load properly, but any before will not properly load and render. Firebug shows error: TG_TimelineView.js (line 1392)

this.getTickSeconds[tickUnit] is not a function pack.seconds = this.getTickSecondstickUnit;

var tg1 = $("#60s").timeline({ "min_zoom":37, "max_zoom":37, "show_centerline":true, "data_source":"timeglider/json_tests/js_history.json", "show_footer":false, "display_zoom_level": false, "constrain_to_data": true, 'icon_folder': 'timeglider/js/timeglider/icons/', "event_overflow":'hide' }); var tg2 = $("#70s").timeline({ "min_zoom":37, "max_zoom":37, "show_centerline":true, "data_source":"timeglider/json_tests/idaho.json", "show_footer":false, "display_zoom_level": false, "constrain_to_data": true, 'icon_folder': 'timeglider/js/timeglider/icons/', "event_overflow":'hide' });

timeglider commented 12 years ago

Unfortunately, there are some fundamental issues in the architecture that foobar multiple instances. Different errors will come up on different browsers, also depending on load times, because there are variables being stored in some closures that are shared across all instances of timeglider which should not be shared...

I've got a basic plan for fixing this, but am not planning to resolve this for a few months at least.

----- Michael

On Thu, Mar 8, 2012 at 10:52 AM, framejk < reply@reply.github.com

wrote:

Trying to have multiple timeline widgets loaded into a single page. The last timeload will load properly, but any before will not properly load and render. Firebug shows error: TG_TimelineView.js (line 1392)

this.getTickSeconds[tickUnit] is not a function pack.seconds = this.getTickSecondstickUnit;

var tg1 = $("#60s").timeline({ "min_zoom":37, "max_zoom":37, "show_centerline":true, "data_source":"timeglider/json_tests/js_history.json", "show_footer":false, "display_zoom_level": false, "constrain_to_data": true, 'icon_folder': 'timeglider/js/timeglider/icons/', "event_overflow":'hide' }); var tg2 = $("#70s").timeline({ "min_zoom":37, "max_zoom":37, "show_centerline":true, "data_source":"timeglider/json_tests/idaho.json", "show_footer":false, "display_zoom_level": false, "constrain_to_data": true, 'icon_folder': 'timeglider/js/timeglider/icons/', "event_overflow":'hide' });


Reply to this email directly or view it on GitHub: https://github.com/timeglider/jquery_widget/issues/40

framejk commented 12 years ago

Thanks for the quick response. Love the plugin and see great potential for it.