simple-color-picker
Advanced tools
Comparing version 0.1.1 to 0.1.2
{ | ||
"name": "simple-color-picker", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "Simple Color picker in common.js.", | ||
@@ -35,5 +35,5 @@ "author": "Guillaume Gouessan <guillaume.gouessan@gmail.com>", | ||
"devDependencies": { | ||
"autoprefixer-stylus": "^0.9.4", | ||
"autoprefixer-stylus": "^0.11.0", | ||
"browserify": "^13.0.1", | ||
"budo": "^8.3.0", | ||
"budo": "^9.3.0", | ||
"faucet": "0.0.1", | ||
@@ -53,5 +53,5 @@ "garnish": "^5.2.0", | ||
"dom-transform": "^2.1.0", | ||
"is-number": "^2.1.0", | ||
"is-number": "^3.0.0", | ||
"tinycolor2": "^1.3.0" | ||
} | ||
} |
@@ -30,3 +30,2 @@ 'use strict'; | ||
this.hue = 0; | ||
this.choosing = false; | ||
this.position = {x: 0, y: 0}; | ||
@@ -168,5 +167,9 @@ this.huePosition = 0; | ||
this.$el.style.height = this.height + this.heightUnits; | ||
this.saturationWidth = this.$saturation.clientWidth; | ||
this.hueHeight = this.$hue.clientHeight; | ||
this.saturationWidth = this.width - 25; | ||
this.$saturation.style.width = this.saturationWidth + 'px'; | ||
this.hueHeight = this.height; | ||
this.maxHue = this.hueHeight - 2; | ||
return this; | ||
@@ -325,3 +328,2 @@ }; | ||
SimpleColorPicker.prototype._onSaturationMouseDown = function(e) { | ||
this.choosing = true; | ||
var sbOffset = this.$saturation.getBoundingClientRect(); | ||
@@ -348,3 +350,2 @@ var xPos = getMousePosition(e).x; | ||
SimpleColorPicker.prototype._onSaturationMouseUp = function() { | ||
this.choosing = false; | ||
window.removeEventListener('mouseup', this._onSaturationMouseUp); | ||
@@ -357,3 +358,2 @@ window.removeEventListener('touchend', this._onSaturationMouseUp); | ||
SimpleColorPicker.prototype._onHueMouseDown = function(e) { | ||
this.choosing = true; | ||
var hOffset = this.$hue.getBoundingClientRect(); | ||
@@ -378,3 +378,2 @@ var yPos = getMousePosition(e).y; | ||
SimpleColorPicker.prototype._onHueMouseUp = function() { | ||
this.choosing = false; | ||
window.removeEventListener('mouseup', this._onHueMouseUp); | ||
@@ -381,0 +380,0 @@ window.removeEventListener('touchend', this._onHueMouseUp); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
81573
809
+ Addedis-number@3.0.0(transitive)
- Removedis-number@2.1.0(transitive)
Updatedis-number@^3.0.0