Made several fixes and improments to SVG icons page

git-svn-id: http://svg-edit.googlecode.com/svn/branches/transformlist@912 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
Alexis Deveria
2009-11-05 21:25:33 +00:00
parent ea383530dd
commit 3301054326
4 changed files with 282 additions and 100 deletions

View File

@@ -81,7 +81,6 @@ $.fn.SpinButton = function(cfg){
delay: cfg && cfg.delay ? Number(cfg.delay) : 500,
interval: cfg && cfg.interval ? Number(cfg.interval) : 100,
_btn_width: 20,
_btn_height: 12,
_direction: null,
_delay: null,
_repeat: null,
@@ -112,9 +111,10 @@ $.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 direction =
(x > coord(el,'offsetLeft') + el.offsetWidth - this.spinCfg._btn_width)
? ((y < coord(el,'offsetTop') + this.spinCfg._btn_height) ? 1 : -1) : 0;
? ((y < coord(el,'offsetTop') + height) ? 1 : -1) : 0;
if (direction !== this.spinCfg._direction) {
// Style up/down buttons: