mirror of
https://github.com/taroved/pol
synced 2025-05-27 19:40:09 -07:00
st fix
This commit is contained in:
parent
9f73debac4
commit
3fe6d189a3
@ -11,7 +11,7 @@ def _get_fork_stack(stacks):
|
||||
for i in range(0, len(first)):
|
||||
tag = first[i]
|
||||
for name in stacks:
|
||||
if tag != stacks[name][i]:
|
||||
if i >= len(stacks[name]) or tag != stacks[name][i]:
|
||||
return stacks[name][:i]
|
||||
return first
|
||||
|
||||
|
@ -94,17 +94,15 @@ var styleTool = {
|
||||
/**
|
||||
* Marker class. Combination of element, element style, and element click handler.
|
||||
*/
|
||||
function Marker(element, style_name, click_handler) {
|
||||
function Marker(element, style_name) {
|
||||
this.element = element;
|
||||
this.style_name = style_name;
|
||||
this.click_event = $(this.element).bind('click', click_handler);
|
||||
|
||||
styleTool.styleMarker(this);
|
||||
|
||||
var m = this;
|
||||
this.remove = function() {
|
||||
styleTool.unstyleMarker(m);
|
||||
$(m.element).unbind('click', click_handler);
|
||||
}
|
||||
}
|
||||
|
||||
@ -181,7 +179,7 @@ function Item(name, button) {
|
||||
this.onSelectionElementClick = function(element) {
|
||||
that._markers = [];
|
||||
// mark current element
|
||||
that.manual_marker = new Marker(element, that.name +'_manual', that._manual_marker_click);
|
||||
that.manual_marker = new Marker(element, that.name +'_manual');
|
||||
that._markers.push(that.manual_marker);
|
||||
|
||||
updateSelection().then(function(){
|
||||
@ -211,7 +209,7 @@ function Item(name, button) {
|
||||
// go by tag-ids for item
|
||||
data[name].forEach(function(id){
|
||||
if (id != manual_id)
|
||||
item._markers.push(new Marker(id2el[id], item.name +'_calculated', function(){}));
|
||||
item._markers.push(new Marker(id2el[id], item.name +'_calculated'));
|
||||
});
|
||||
// remove all hover styles
|
||||
styleTool.unstyleAll('hover');
|
||||
@ -224,13 +222,6 @@ function Item(name, button) {
|
||||
console.log('Server error: '+ error);
|
||||
});
|
||||
}
|
||||
|
||||
this._manual_marker_click = function() {
|
||||
//remove markers
|
||||
that._markers.forEach(function(marker){
|
||||
marker.remove();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
var items = {};
|
||||
|
Loading…
x
Reference in New Issue
Block a user