Implemented new icon size scaling method

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1645 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
Alexis Deveria
2010-07-27 13:37:52 +00:00
parent 32aec94b36
commit 0d1284ca23
5 changed files with 292 additions and 155 deletions

View File

@@ -117,10 +117,12 @@ $.fn.SpinButton = function(cfg){
var x = e.pageX || e.x;
var y = e.pageY || e.y;
var el = e.target || e.srcElement;
var height = $(el).outerHeight()/2;
var scale = svgEditor.tool_scale || 1;
var height = $(el).height()/2;
var direction =
(x > coord(el,'offsetLeft') + el.offsetWidth - this.spinCfg._btn_width)
? ((y < coord(el,'offsetTop') + height) ? 1 : -1) : 0;
(x > coord(el,'offsetLeft') + el.offsetWidth*scale - this.spinCfg._btn_width)
? ((y < coord(el,'offsetTop') + height*scale) ? 1 : -1) : 0;
if (direction !== this.spinCfg._direction) {
// Style up/down buttons: