gatemezing / timemap

Timemap project automatically exported from code.google.com/p/timemap
MIT License
0 stars 0 forks source link

changeTheme only changes the map marker and not the timeline line #72

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. use timemap.1.6
2. edit TimeMap.init
3. add the following datasets option:

    openInfoWindow: function() {
        var item = this;
        item.changeTheme(TimeMap.themes.red);
    }

What is the expected output? What do you see instead?

I want the theme of the item to change, both on the marker and on the timeline. 
The marker changes the color, but the timeline line remains the same.

What version of the product are you using? On what operating system?

Timemap.1.6 without the timemap_full.pack.js, and including:
    timemap.1.6/timemap.js
    timemap.1.6/loaders/json.js
    timemap.1.6/loaders/progressive.js
    timemap.1.6/manipulation.js
WindowsVista > Firefox 3.6.6

Please provide any additional information below.

The javascript console does not present any error.

(thank you for the prompt reply that you provided before)

Original issue reported on code.google.com by rui.pcoe...@netcabo.pt on 1 Jul 2010 at 10:34

GoogleCodeExporter commented 9 years ago
Meanwhile I found out:
1) It works fine with WindowsVista > Internet Explorer 7.0.6001.18000
2) If using WindowsVista > Firefox 3.6.6, I need to moove the map or make zoom 
in order to the color in the timeline to change. 

I hope this helps.

Original comment by rui.pcoe...@netcabo.pt on 6 Jul 2010 at 8:25

GoogleCodeExporter commented 9 years ago
This is intentional, at least to some extent. In order to update the timeline, 
you have to call tm.timeline.layout(), which redraws all of the events; because 
this is an expensive operation, I made TimeMapDataset#changeTheme() call 
layout(), but TimeMapItem#changeTheme() does not - you have to do it manually.

It might make sense to add a parameter to TimeMapItem#changeTheme() specifying 
whether or not layout() should be called, so that you can easily suppress it in 
batch operations. I'll look into this - in the meantime, you can do this:

item.changeTheme(TimeMap.themes.blue);
item.timeline.layout();

Original comment by nick.rab...@gmail.com on 9 Jul 2010 at 5:51

GoogleCodeExporter commented 9 years ago

Original comment by nick.rab...@gmail.com on 9 Jul 2010 at 5:53

GoogleCodeExporter commented 9 years ago

Original comment by nick.rab...@gmail.com on 9 Jul 2010 at 5:53

GoogleCodeExporter commented 9 years ago
This is fixed in trunk.

Original comment by nick.rab...@gmail.com on 5 Sep 2010 at 12:12