Closed meren closed 9 years ago
Very good blueprint Meren, i agree most of it except layer-order, almost all loops in treelib is like "var i = 0; i < settings['layer-order'].length; i++" and layer-order should be independent array instead of object's property to keep this loops clean. I am going to work on this today,
I see your point about the array.
I just tested your commit, and it works beautifully :) Thank you very much. Just merge it to the master whenever you feel like it.
One final note: I think it would be valuable to have a "version" number for the interactive tree separately. We can store this version number in the state file, and if a state file is missing the version variable (which will be the case for older state files), or reports a version that is not matching to the version of the JS code expects (which will be the case if we change the structure in the future), JS code could be like "well, I am not even going to try to make sense of it". Just an idea.
Thanks again!
Okay i am going to merge it but ping me if you notice any bugs.
Thank you!
Hi Ozcan,
When you set a color for a layer in a view (say in "mean_coverage" view), it goes back to defaults when you switch to a different view.
Naturally, when the user saves the state, colors are saved as a property of the view:
And then down below in a state file, there is this which keeps the order information for each layer:
I think we need a "layers" entry, instead of a "layer-order", and "order" should be a property in it along with "color" and "height".
After all these are view-specific:
normalization
,min
max
And these are layer-specific:
order
color
height
So my suggestions for change are:
layer-order
list becomeslayers
dict,order
becomes an element in it for everylayer_id
. Of course it will complicate things because the first entry in the second screenshot will look like this (note, 42 is the parent, so no color):height
andcolor
is removed fromviews
dict, and added intolayers
dict.SELECTED
is removed from state (since we have collections for that info).What do you think? Does it make sense?
Sorry for the long list :( There is no rush for this. Just wanted to put it in here.