~makyo/juju-gui/clear-state-refactor

« back to all changes in this revision

Viewing changes to app/views/environment.js

  • Committer: kapil.foss at gmail
  • Date: 2012-10-15 18:21:48 UTC
  • Revision ID: kapil.foss@gmail.com-20121015182148-nvbmx34stf4z3smw
[trivial] long svc click more predictable, charm search css fix from gary

Show diffs side-by-side

added added

removed removed

Lines of Context:
145
145
            'mousedown.addrel': function(d, self) {
146
146
              var evt = d3.event;
147
147
              self.longClickTimer = Y.later(750, this, function(d, e) {
148
 
                self.longClickTimer = null;
149
 
 
150
148
                // Provide some leeway for accidental dragging.
151
149
                if ((Math.abs(d.x - d.oldX) + Math.abs(d.y - d.oldY)) /
152
150
                    2 > 5) {
181
179
              // Cancel the long-click timer if it exists.
182
180
              if (self.longClickTimer) {
183
181
                self.longClickTimer.cancel();
184
 
                self.longClickTimer = null;
185
182
              }
186
183
            }
187
184
          }
445
442
                if (self.buildingRelation) {
446
443
                  self.addRelationDrag.call(self, d, this);
447
444
                } else {
448
 
                  /*if (self.longClickTimer) {
 
445
                  if (self.longClickTimer) {
449
446
                    self.longClickTimer.cancel();
450
 
                    self.longClickTimer = null;
451
 
                  }*/
 
447
                  }
452
448
                  d.x += d3.event.dx;
453
449
                  d.y += d3.event.dy;
454
450
                  d3.select(this).attr('transform', function(d, i) {