mirror of
https://github.com/xibyte/jsketcher
synced 2026-02-14 19:33:46 +01:00
fix bugs in constraints list
This commit is contained in:
parent
61c42e0906
commit
c0bf2e64ff
2 changed files with 6 additions and 4 deletions
|
|
@ -56,8 +56,10 @@ TCAD.ui.List.prototype.refresh = function() {
|
|||
var model = this.model;
|
||||
for (var i = 0; i < items.length; ++i) {
|
||||
var item = items[i];
|
||||
this.ul.append(this.template.replace('$name$', item.name));
|
||||
this.ul.find('li:last input').click(function() {model.remove(item, i)});
|
||||
this.ul.find('li:last').hover(function() {model.hover(item, i)});
|
||||
var li = $(this.template.replace('$name$', item.name));
|
||||
this.ul.append(li);
|
||||
var index = i;
|
||||
li.find('.ui-rm').click(function() {model.remove(item, index)});
|
||||
li.hover(function() {model.hover(item, index)});
|
||||
}
|
||||
};
|
||||
|
|
@ -270,7 +270,7 @@
|
|||
<div class="panel b-right scroll" style="float: left; width: 245px; height: 100%;">
|
||||
<div class="tool-caption">CONSTRAINTS</div>
|
||||
<ul class="tlist" id='constrs'>
|
||||
<li>$name$<span class="rm" style="float: right;"><input class="btn sbtn" style="" type="submit" value="✘"></span></li>
|
||||
<li>$name$<span class="rm" style="float: right;"><input class="btn sbtn ui-rm" style="" type="submit" value="✘"></span></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div style="background: black; float: left; width: calc(100% - 298px); height: 100%;">
|
||||
|
|
|
|||
Loading…
Reference in a new issue