Fixes loading in header and right mouse button

pull/38/head
peterd 8 years ago
parent 91b3f2d618
commit 557f47285a

6
color.all.min.js vendored

File diff suppressed because one or more lines are too long

@ -13,8 +13,8 @@
// _bgsPng: ..., // some more icon sprite images
// }
_devMode = !_data, // if no _data we assume that colorPicker.data.js is missing (for development)
_isIE = document.createStyleSheet !== undefined && document.getElementById || !!window.MSInputMethodContext,
_doesOpacity = typeof document.body.style.opacity !== 'undefined',
_isIE = false,
_doesOpacity = false,
// _isIE8 = _isIE && document.querySelectorAll,
_valueRanges = {}, // will be assigned in initInstance() by Colors instance
@ -213,6 +213,8 @@
for (var option in options) { // deep copy ??
THIS.options[option] = options[option];
}
_isIE = document.createStyleSheet !== undefined && document.getElementById || !!window.MSInputMethodContext;
_doesOpacity = typeof document.body.style.opacity !== 'undefined';
_colorInstance = new Colors(THIS.options);
// We transfer the responsibility to the instance of Color (to save space and memory)
delete THIS.options;
@ -438,7 +440,8 @@
onOffEvent(_nodes.colorPicker, 'mousedown', function(e) {
var event = e || window.event,
page = getPageXY(event),
target = event.target || event.srcElement,
target = (event.button || event.which) < 2 ?
(event.target || event.srcElement) : {},
className = target.className;
focusInstance(THIS);

File diff suppressed because one or more lines are too long

@ -28,8 +28,8 @@
grey = {r: 0.298954, g: 0.586434, b: 0.114612}, // CIE-XYZ 1931
luminance = {r: 0.2126, g: 0.7152, b: 0.0722}, // W3C 2.0
_math = Math,
_parseint = parseInt,
_math = window.Math,
_parseint = window.parseInt,
Colors = window.Colors = function(options) {
this.colors = {RND: {}};
@ -167,7 +167,8 @@
alpha = alpha !== undefined ? alpha : color.alpha;
} else if (color) {
for (var n in color) {
colors[type][n] = limitValue(color[n] / _valueRanges[type][n][1], 0 , 1);
colors[type][n] = type === 'Lab' ? color[n] :
limitValue(color[n] / _valueRanges[type][n][1], 0 , 1);
}
}
if (alpha !== undefined) {

@ -163,7 +163,7 @@
type = child.id.substr(0, len),
mode = child.id.charAt(len).toLowerCase();
if (child.id) child.children[0].style.width = (color.RND[type][mode] / max[type][mode] * 100) + '%';
child.children[0].style.width = (color.RND[type][mode] / max[type][mode] * 100) + '%';
}
};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save