diff --git a/README.md b/README.md index 1f2a9e8..b3c159b 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,6 @@ var myColorPicker = new ColorPicker({ delayOffset: 8, // pixels offset when shifting mouse up/down inside input fields before it starts acting as slider CSSPrefix: 'cp-', // the standard prefix for (almost) all class declarations (HTML, CSS) size: 0, // one of the 4 sizes: 0 = L (large), 1 = S, 2 = XS, 3 = XXS; resize to see what happens... - scale: 1, // only used internaly if size changes... (should't be here) allMixDetails: true, // see Colors... alphaBG: 'w' // initial 3rd layer bgColor (w = white, c = custom (customBG), b = black); customBG: '#808080' // see Colors... diff --git a/colorPicker.js b/colorPicker.js index 693c29d..a76799e 100644 --- a/colorPicker.js +++ b/colorPicker.js @@ -66,7 +66,6 @@ fps: 60, // 1000 / 60 = ~16.7ms delayOffset: 8, CSSPrefix: 'cp-', - scale: 1, allMixDetails: true, alphaBG: 'w', imagePath: '', @@ -197,6 +196,7 @@ // We transfer the responsibility to the instance of Color (to save space and memory) delete THIS.options; _options = _colorInstance.options; + _options.scale = 1; CSSPrefix = _options.CSSPrefix; THIS.color = _colorInstance; // check this again... @@ -838,7 +838,7 @@ function resizeApp(e, size) { var event = e || window.event, - page = getPageXY(event), + page = event ? getPageXY(event) : {}, isSize = size !== undefined, x = isSize ? size : page.X - _targetOrigin.left + 8, y = isSize ? size : page.Y - _targetOrigin.top + 8, diff --git a/index.js b/index.js index 6378096..915cbef 100644 --- a/index.js +++ b/index.js @@ -423,7 +423,7 @@ renderCallback = doRender, // finally the instance of either ColorPicker or Colors (export for debugging purposes) color_ColorPicker = new (ColorPicker || Colors)({ - customBG: '#808080' + customBG: '#808080', // renderCallback: renderCallback, // doesn't work in Colors, but also doesn't matter // convertCallback: function(color, type){console.log(color, type)} // resizeCallback: function(e, value, scale, original){console.log(e, value, scale, original)}