Skip to content

Commit 5723fa8

Browse files
committed
Bumping to v2.7.2
1 parent 7b45769 commit 5723fa8

8 files changed

+40
-24
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "angular-color-picker",
33
"description": "Color Picker Directive For AngularJS",
4-
"version": "2.7.1",
4+
"version": "2.7.2",
55
"homepage": "https://github.com/ruhley/angular-color-picker",
66
"repository": {
77
"type": "git",

dist/angularjs-color-picker.css

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/angularjs-color-picker.js

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
/*!
2-
* angularjs-color-picker v2.7.1
2+
* angularjs-color-picker v2.7.2
33
* https://github.com/ruhley/angular-color-picker/
44
*
55
* Copyright 2016 ruhley
66
*
7-
* 2016-11-23 10:23:24
7+
* 2016-12-23 14:00:20
88
*
99
*/
1010

@@ -1166,19 +1166,35 @@ var AngularColorPickerController = function () {
11661166
}, {
11671167
key: 'updateRoundPos',
11681168
value: function updateRoundPos() {
1169-
var container = this.$element[0].querySelector('.color-picker-grid');
1170-
var el = angular.element(this.$element[0].querySelector('.color-picker-grid .color-picker-picker'));
1171-
var bounding = container.getBoundingClientRect();
1169+
var _this9 = this;
11721170

1173-
el.css({
1174-
left: bounding.width * this.xPos / 100 + 'px',
1175-
top: bounding.height * this.yPos / 100 + 'px'
1171+
this.$timeout(function () {
1172+
var container = _this9.$element[0].querySelector('.color-picker-grid');
1173+
var el = angular.element(_this9.$element[0].querySelector('.color-picker-grid .color-picker-picker'));
1174+
var bounding = container.getBoundingClientRect();
1175+
1176+
el.css({
1177+
left: bounding.width * _this9.xPos / 100 + 'px',
1178+
top: bounding.height * _this9.yPos / 100 + 'px'
1179+
});
11761180
});
11771181
}
11781182
}, {
11791183
key: 'getEventPos',
11801184
value: function getEventPos(event) {
1181-
return event.type.search('touch') === 0 ? event.changedTouches[0] : event;
1185+
// if a touch event
1186+
if (event.type.search('touch') === 0) {
1187+
// if event modified by angular
1188+
if (event.originalEvent && event.originalEvent.changedTouches) {
1189+
return event.originalEvent.changedTouches[0];
1190+
// if a standard js touch event
1191+
} else if (event.changedTouches) {
1192+
return event.changedTouches[0];
1193+
}
1194+
}
1195+
1196+
// return a non-touch event
1197+
return event;
11821198
}
11831199
}, {
11841200
key: 'eventApiDispatch',

dist/angularjs-color-picker.min.css

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/angularjs-color-picker.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/themes/angularjs-color-picker-bootstrap.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
/*!
2-
* angularjs-color-picker v2.7.1
2+
* angularjs-color-picker v2.7.2
33
* https://github.com/ruhley/angular-color-picker/
44
*
55
* Copyright 2016 ruhley
66
*
7-
* 2016-11-23 10:23:27
7+
* 2016-12-23 14:00:23
88
*
99
*/
1010
.color-picker-wrapper .color-picker-input-wrapper {
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/*!
2-
* angularjs-color-picker v2.7.1
2+
* angularjs-color-picker v2.7.2
33
* https://github.com/ruhley/angular-color-picker/
44
*
55
* Copyright 2016 ruhley
66
*
7-
* 2016-11-23 10:23:27
7+
* 2016-12-23 14:00:23
88
*
99
*/.color-picker-wrapper .color-picker-input-wrapper{width:100%}.color-picker-wrapper .color-picker-swatch:not(.input-group-addon){height:28px}.color-picker-wrapper.color-picker-swatch-only .input-group .input-group-addon{border-radius:4px}

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "angularjs-color-picker",
33
"description": "Color Picker Directive For AngularJS",
4-
"version": "2.7.1",
4+
"version": "2.7.2",
55
"license": "MIT",
66
"main": "dist/angularjs-color-picker.min.js",
77
"dependencies": {
@@ -19,12 +19,12 @@
1919
"Benjamin Orozco <[email protected]>"
2020
],
2121
"devDependencies": {
22-
"babel-preset-es2015-rollup": "^1.1.1",
22+
"babel-preset-es2015-rollup": "^3.0.0",
2323
"glob": "^7.0.0",
2424
"grunt": "~1.0.0",
2525
"grunt-contrib-clean": "~1.0.0",
2626
"grunt-contrib-cssmin": "~1.0.0",
27-
"grunt-contrib-jshint": "~1.0.0",
27+
"grunt-contrib-jshint": "~1.1.0",
2828
"grunt-contrib-less": "^1.3.0",
2929
"grunt-notify": "~0.4.1",
3030
"grunt-run": "^0.6.0",

0 commit comments

Comments
 (0)