diff --git a/README.md b/README.md index 4337ae0..6d5b188 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ var myColorPicker = new ColorPicker({ memoryColors: [{r: 100, g: 200, b: 10, a: 0.8}, ...] // array of colors in memory section opacityPositionRelative: undefined, // render opacity slider arrows in px or % customCSS: undefined, // if external stylesheet, internal will be ignored... - appenTo: document.body, // the HTMLElement the colorPicker will be appended to on initialization + appendTo: document.body, // the HTMLElement the colorPicker will be appended to on initialization noRangeBackground: false, // performance option: doesn't render backgrounds in input fields if set to false textRight: false, // not supported yet. Make numbers appear aligned right noHexButton: false, // button next to HEX input could be used for some trigger... diff --git a/colorPicker.js b/colorPicker.js index 4d10ca3..e91f943 100644 --- a/colorPicker.js +++ b/colorPicker.js @@ -83,7 +83,7 @@ // opacityPositionRelative: undefined, // customCSS: undefined, - // appenTo: document.body, + // appendTo: document.body, // noRangeBackground: false, // textRight: false, ????? // noHexButton: false, @@ -377,7 +377,7 @@ // get a better addClass for this.... // app.className = app.className.split(' ')[0]; // cleanup for multy instances - return (_options.appenTo || document.body).appendChild(app); + return (_options.appendTo || document.body).appendChild(app); } function getInstanceNodes(colorPicker, THIS) { // check nodes again... are they all needed? @@ -553,6 +553,7 @@ changeClass(_nodes.panel, '(?:start-change|do-change)', ''); _nodes.resizer.style.cssText = ''; + _nodes.panelCover.style.cssText = ''; _nodes.memo_store.style.cssText = 'background-color: ' + color2string(_colors.RND.rgb) + '; ' + getOpacityCSS(_colors.alpha); @@ -564,7 +565,6 @@ _valueType = undefined; resetCursors(); - _nodes.panelCover.style.cssText = ''; if (_options.actionCallback) { _options.actionCallback(e, _action || mouseMoveAction.name || action || 'external');