Calling this a patch commit lets go!
This commit is contained in:
parent
00b5efa484
commit
4202d01630
|
@ -88,6 +88,12 @@ light.init = function () {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
light.disable = function () {
|
||||||
|
light.disabled = true;
|
||||||
|
}
|
||||||
|
light.enable = function () {
|
||||||
|
light.disabled = false;
|
||||||
|
};
|
||||||
light.colorPickers = function () {
|
light.colorPickers = function () {
|
||||||
'use strict';
|
'use strict';
|
||||||
$('#colors-tabs').w2tabs({
|
$('#colors-tabs').w2tabs({
|
||||||
|
@ -116,6 +122,14 @@ light.set = function (rgb, callback) { //rgb = [0,0,0]
|
||||||
'use strict';
|
'use strict';
|
||||||
var obj;
|
var obj;
|
||||||
|
|
||||||
|
if (light.disabled){
|
||||||
|
if (callback) {
|
||||||
|
return callback();
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (light.lock) {
|
if (light.lock) {
|
||||||
//potential for logging overlapping commands
|
//potential for logging overlapping commands
|
||||||
return false;
|
return false;
|
||||||
|
@ -130,7 +144,7 @@ light.set = function (rgb, callback) { //rgb = [0,0,0]
|
||||||
if (typeof callback !== 'undefined') {
|
if (typeof callback !== 'undefined') {
|
||||||
obj.callback = callback;
|
obj.callback = callback;
|
||||||
}
|
}
|
||||||
light.queue[obj.id] = obj;
|
light.queue[obj.id] = obj;//
|
||||||
light.current = rgb;
|
light.current = rgb;
|
||||||
light.lock = true;
|
light.lock = true;
|
||||||
};
|
};
|
||||||
|
@ -154,6 +168,11 @@ light.listen = function () {
|
||||||
light.preview = function (rgb, name) {
|
light.preview = function (rgb, name) {
|
||||||
'use strict';
|
'use strict';
|
||||||
var rgbStr;
|
var rgbStr;
|
||||||
|
|
||||||
|
if (light.disabled) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
rgb = light.rgb.floor(rgb);
|
rgb = light.rgb.floor(rgb);
|
||||||
rgbStr = 'rgb(' + rgb.join(',') + ')';
|
rgbStr = 'rgb(' + rgb.join(',') + ')';
|
||||||
light.color = rgb;
|
light.color = rgb;
|
||||||
|
@ -173,6 +192,11 @@ light.display = function (rgb) { //display light active state
|
||||||
'use strict';
|
'use strict';
|
||||||
var str,
|
var str,
|
||||||
i;
|
i;
|
||||||
|
|
||||||
|
if (light.disabled) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
rgb = light.rgb.floor(rgb);
|
rgb = light.rgb.floor(rgb);
|
||||||
for (i = 0; i < 3; i++) {
|
for (i = 0; i < 3; i++) {
|
||||||
$('#light-status form input').eq(i).val(rgb[i]);
|
$('#light-status form input').eq(i).val(rgb[i]);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "mcopy-app",
|
"name": "mcopy-app",
|
||||||
"version": "1.2.2",
|
"version": "1.2.3",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "mcopy-app",
|
"name": "mcopy-app",
|
||||||
"version": "1.2.2",
|
"version": "1.2.3",
|
||||||
"description": "GUI for the mcopy small gauge film optical printer platform",
|
"description": "GUI for the mcopy small gauge film optical printer platform",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
Loading…
Reference in New Issue