|
@@ -144,8 +144,7 @@ module INSPECTOR {
|
|
} else if (e.keyCode == 9) { // Tab
|
|
} else if (e.keyCode == 9) { // Tab
|
|
e.preventDefault();
|
|
e.preventDefault();
|
|
this.validateInput(this._input.value);
|
|
this.validateInput(this._input.value);
|
|
- } else if (e.keyCode == 27) {
|
|
|
|
- // Esc : remove input
|
|
|
|
|
|
+ } else if (e.keyCode == 27) { // Esc : remove input
|
|
this.update();
|
|
this.update();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -454,19 +453,19 @@ module INSPECTOR {
|
|
propToDisplay.sort().reverse();
|
|
propToDisplay.sort().reverse();
|
|
}
|
|
}
|
|
for (let prop of propToDisplay) {
|
|
for (let prop of propToDisplay) {
|
|
- let infos = new Property(prop, this._property.value);
|
|
|
|
|
|
+ let infos = new Property(prop, this._property.value, this._property.obj);
|
|
let child = new PropertyLine(infos, this, this._level + PropertyLine._MARGIN_LEFT);
|
|
let child = new PropertyLine(infos, this, this._level + PropertyLine._MARGIN_LEFT);
|
|
this._children.push(child);
|
|
this._children.push(child);
|
|
}
|
|
}
|
|
//Add the Hexa converter
|
|
//Add the Hexa converter
|
|
if ((propToDisplay.indexOf('r') && propToDisplay.indexOf('g') && propToDisplay.indexOf('b') && propToDisplay.indexOf('a')) == 0){
|
|
if ((propToDisplay.indexOf('r') && propToDisplay.indexOf('g') && propToDisplay.indexOf('b') && propToDisplay.indexOf('a')) == 0){
|
|
let hexLineInfos = [];
|
|
let hexLineInfos = [];
|
|
- let hexLinePropCheck = new Property("hexEnable", this._property.value);
|
|
|
|
|
|
+ let hexLinePropCheck = new Property("hexEnable", this._property.value, this._property.obj);
|
|
hexLinePropCheck.value = false;
|
|
hexLinePropCheck.value = false;
|
|
let hexLineCheck = new PropertyLine(hexLinePropCheck, this, this._level + PropertyLine._MARGIN_LEFT);
|
|
let hexLineCheck = new PropertyLine(hexLinePropCheck, this, this._level + PropertyLine._MARGIN_LEFT);
|
|
this._children.unshift(hexLineCheck);
|
|
this._children.unshift(hexLineCheck);
|
|
for (let prop of propToDisplay) {
|
|
for (let prop of propToDisplay) {
|
|
- let infos = new Property(prop, this._property.value);
|
|
|
|
|
|
+ let infos = new Property(prop, this._property.value, this._property.obj);
|
|
let valHex = ((infos.value * 255)|0).toString(16);
|
|
let valHex = ((infos.value * 255)|0).toString(16);
|
|
hexLineInfos.push(valHex);
|
|
hexLineInfos.push(valHex);
|
|
if(valHex == "0"){
|
|
if(valHex == "0"){
|
|
@@ -477,7 +476,7 @@ module INSPECTOR {
|
|
hexLineInfos.reverse();
|
|
hexLineInfos.reverse();
|
|
let hexLineString = hexLineInfos.join("");
|
|
let hexLineString = hexLineInfos.join("");
|
|
|
|
|
|
- let hexLineProp = new Property("hex", this._property.value);
|
|
|
|
|
|
+ let hexLineProp = new Property("hex", this._property.value, this._property.obj);
|
|
hexLineProp.value = hexLineString;
|
|
hexLineProp.value = hexLineString;
|
|
let hexLine = new PropertyLine(hexLineProp, this, this._level + PropertyLine._MARGIN_LEFT);
|
|
let hexLine = new PropertyLine(hexLineProp, this, this._level + PropertyLine._MARGIN_LEFT);
|
|
|
|
|