improved gripRadius ternary assignment in Selector and misc formating
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2385 eee81c28-f429-11dd-99c0-75d572ba1dddmaster
parent
a9ab2f2c7e
commit
d51f96012b
|
@ -24,9 +24,7 @@ if (!svgedit.select) {
|
|||
var svgFactory_;
|
||||
var config_;
|
||||
var selectorManager_; // A Singleton
|
||||
|
||||
var gripRadius;
|
||||
svgedit.browser.isTouch() ? gripRadius = 10 : gripRadius = 4;
|
||||
var gripRadius = svgedit.browser.isTouch() ? 10 : 4;
|
||||
|
||||
// Class: svgedit.select.Selector
|
||||
// Private class for DOM element selection boxes
|
||||
|
@ -114,7 +112,7 @@ svgedit.select.Selector.prototype.updateGripCursors = function(angle) {
|
|||
for (var dir in selectorManager_.selectorGrips) {
|
||||
selectorManager_.selectorGrips[dir].setAttribute('style', ('cursor:' + dir_arr[i] + '-resize'));
|
||||
i++;
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
// Function: svgedit.select.Selector.showGrips
|
||||
|
@ -250,7 +248,7 @@ svgedit.select.Selector.prototype.resize = function() {
|
|||
var coords = this.gripCoords[dir];
|
||||
selectedGrips[dir].setAttribute('cx', coords[0]);
|
||||
selectedGrips[dir].setAttribute('cy', coords[1]);
|
||||
};
|
||||
}
|
||||
|
||||
// we want to go 20 pixels in the negative transformed y direction, ignoring scale
|
||||
mgr.rotateGripConnector.setAttribute('x1', nbax + (nbaw)/2);
|
||||
|
|
Loading…
Reference in New Issue