mirror of
https://github.com/taroved/pol
synced 2025-06-01 05:50:08 -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)):
|
for i in range(0, len(first)):
|
||||||
tag = first[i]
|
tag = first[i]
|
||||||
for name in stacks:
|
for name in stacks:
|
||||||
if tag != stacks[name][i]:
|
if i >= len(stacks[name]) or tag != stacks[name][i]:
|
||||||
return stacks[name][:i]
|
return stacks[name][:i]
|
||||||
return first
|
return first
|
||||||
|
|
||||||
|
@ -94,17 +94,15 @@ var styleTool = {
|
|||||||
/**
|
/**
|
||||||
* Marker class. Combination of element, element style, and element click handler.
|
* 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.element = element;
|
||||||
this.style_name = style_name;
|
this.style_name = style_name;
|
||||||
this.click_event = $(this.element).bind('click', click_handler);
|
|
||||||
|
|
||||||
styleTool.styleMarker(this);
|
styleTool.styleMarker(this);
|
||||||
|
|
||||||
var m = this;
|
var m = this;
|
||||||
this.remove = function() {
|
this.remove = function() {
|
||||||
styleTool.unstyleMarker(m);
|
styleTool.unstyleMarker(m);
|
||||||
$(m.element).unbind('click', click_handler);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -181,7 +179,7 @@ function Item(name, button) {
|
|||||||
this.onSelectionElementClick = function(element) {
|
this.onSelectionElementClick = function(element) {
|
||||||
that._markers = [];
|
that._markers = [];
|
||||||
// mark current element
|
// 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);
|
that._markers.push(that.manual_marker);
|
||||||
|
|
||||||
updateSelection().then(function(){
|
updateSelection().then(function(){
|
||||||
@ -211,7 +209,7 @@ function Item(name, button) {
|
|||||||
// go by tag-ids for item
|
// go by tag-ids for item
|
||||||
data[name].forEach(function(id){
|
data[name].forEach(function(id){
|
||||||
if (id != manual_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
|
// remove all hover styles
|
||||||
styleTool.unstyleAll('hover');
|
styleTool.unstyleAll('hover');
|
||||||
@ -224,13 +222,6 @@ function Item(name, button) {
|
|||||||
console.log('Server error: '+ error);
|
console.log('Server error: '+ error);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
this._manual_marker_click = function() {
|
|
||||||
//remove markers
|
|
||||||
that._markers.forEach(function(marker){
|
|
||||||
marker.remove();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var items = {};
|
var items = {};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user