Throttle the drawing of the dependencies
If the dependencies have been drawn in the last 25 ms, they are not redrawn. FEA: ItEr75S08MigrationZK5
This commit is contained in:
parent
128342b8e8
commit
c9761ef295
1 changed files with 6 additions and 3 deletions
|
|
@ -125,14 +125,17 @@ ganttz.TaskComponent = zk.$extends(zul.Widget, {
|
|||
return ganttz.DependencyComponentBase.$(dep);
|
||||
});
|
||||
});
|
||||
var drawDependencies = common.Common.memoize(25, function() {
|
||||
relatedDependencies().forEach(function(dependency) {
|
||||
dependency.draw();
|
||||
});
|
||||
});
|
||||
dragdropregion.on('dragEvent', this.proxy(function(ev) {
|
||||
// Slight overload. It could be more efficent to overwrite the YUI
|
||||
// method
|
||||
// that is setting the top property
|
||||
jq(this.$n()).css('top','');
|
||||
relatedDependencies().forEach(function(dependency) {
|
||||
dependency.draw();
|
||||
});
|
||||
drawDependencies();
|
||||
}), null, false);
|
||||
// Register the event endDragEvent
|
||||
dragdropregion.on('endDragEvent', this.proxy(function(ev) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue