|
@@ -1,29 +1,29 @@
|
|
module INSPECTOR {
|
|
module INSPECTOR {
|
|
-
|
|
|
|
- export class Canvas2DAdapter
|
|
|
|
- extends Adapter
|
|
|
|
|
|
+
|
|
|
|
+ export class Canvas2DAdapter
|
|
|
|
+ extends Adapter
|
|
implements IToolVisible, IToolDebug {
|
|
implements IToolVisible, IToolDebug {
|
|
-
|
|
|
|
- constructor(obj:any) {
|
|
|
|
|
|
+
|
|
|
|
+ constructor(obj: any) {
|
|
super(obj);
|
|
super(obj);
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
/** Returns the name displayed in the tree */
|
|
/** Returns the name displayed in the tree */
|
|
- public id() : string {
|
|
|
|
|
|
+ public id(): string {
|
|
let str = '';
|
|
let str = '';
|
|
if (this._obj.id) {
|
|
if (this._obj.id) {
|
|
str = this._obj.id;
|
|
str = this._obj.id;
|
|
} // otherwise nothing displayed
|
|
} // otherwise nothing displayed
|
|
return str;
|
|
return str;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
/** Returns the type of this object - displayed in the tree */
|
|
/** Returns the type of this object - displayed in the tree */
|
|
- public type() : string{
|
|
|
|
|
|
+ public type(): string {
|
|
return Helpers.GET_TYPE(this._obj);
|
|
return Helpers.GET_TYPE(this._obj);
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
/** Returns the list of properties to be displayed for this adapter */
|
|
/** Returns the list of properties to be displayed for this adapter */
|
|
- public getProperties() : Array<PropertyLine> {
|
|
|
|
|
|
+ public getProperties(): Array<PropertyLine> {
|
|
let propertiesLines = [];
|
|
let propertiesLines = [];
|
|
if (this._obj.propDic) {
|
|
if (this._obj.propDic) {
|
|
let dico = this._obj.propDic as BABYLON.StringDictionary<BABYLON.Prim2DPropInfo>;
|
|
let dico = this._obj.propDic as BABYLON.StringDictionary<BABYLON.Prim2DPropInfo>;
|
|
@@ -31,42 +31,42 @@ module INSPECTOR {
|
|
let property = new Property(name, this.actualObject);
|
|
let property = new Property(name, this.actualObject);
|
|
propertiesLines.push(new PropertyLine(property));
|
|
propertiesLines.push(new PropertyLine(property));
|
|
});
|
|
});
|
|
- }
|
|
|
|
|
|
+ }
|
|
// TODO REMOVE THIS WHEN PROPERTIES WILL BE DECORATED
|
|
// TODO REMOVE THIS WHEN PROPERTIES WILL BE DECORATED
|
|
let toAddDirty = [
|
|
let toAddDirty = [
|
|
- 'actualZOffset', 'isSizeAuto', 'layoutArea', 'layoutAreaPos', 'contentArea',
|
|
|
|
- 'marginOffset', 'paddingOffset', 'isPickable', 'isContainer', 'boundingInfo',
|
|
|
|
- 'levelBoundingInfo', 'isSizedByContent', 'isPositionAuto', 'actualScale', 'layoutBoundingInfo',
|
|
|
|
- '_cachedTexture'];
|
|
|
|
|
|
+ 'actualZOffset', 'isSizeAuto', 'layoutArea', 'layoutAreaPos', 'contentArea',
|
|
|
|
+ 'marginOffset', 'paddingOffset', 'isPickable', 'isContainer', 'boundingInfo',
|
|
|
|
+ 'levelBoundingInfo', 'isSizedByContent', 'isPositionAuto', 'actualScale', 'layoutBoundingInfo',
|
|
|
|
+ '_cachedTexture', 'actualOpacity'];
|
|
for (let dirty of toAddDirty) {
|
|
for (let dirty of toAddDirty) {
|
|
let infos = new Property(dirty, this.actualObject);
|
|
let infos = new Property(dirty, this.actualObject);
|
|
propertiesLines.push(new PropertyLine(infos));
|
|
propertiesLines.push(new PropertyLine(infos));
|
|
}
|
|
}
|
|
- return propertiesLines;
|
|
|
|
|
|
+ return propertiesLines;
|
|
}
|
|
}
|
|
|
|
|
|
- public getTools() : Array<AbstractTreeTool> {
|
|
|
|
|
|
+ public getTools(): Array<AbstractTreeTool> {
|
|
let tools = [];
|
|
let tools = [];
|
|
tools.push(new Checkbox(this));
|
|
tools.push(new Checkbox(this));
|
|
- tools.push(new DebugArea(this));
|
|
|
|
|
|
+ tools.push(new DebugArea(this));
|
|
return tools;
|
|
return tools;
|
|
}
|
|
}
|
|
|
|
|
|
/// TOOLS ///
|
|
/// TOOLS ///
|
|
- public setVisible(b:boolean) {
|
|
|
|
|
|
+ public setVisible(b: boolean) {
|
|
this._obj.levelVisible = b;
|
|
this._obj.levelVisible = b;
|
|
}
|
|
}
|
|
- public isVisible():boolean{
|
|
|
|
|
|
+ public isVisible(): boolean {
|
|
return this._obj.levelVisible;
|
|
return this._obj.levelVisible;
|
|
}
|
|
}
|
|
/** Overrides super */
|
|
/** Overrides super */
|
|
- public debug(b:boolean) {
|
|
|
|
|
|
+ public debug(b: boolean) {
|
|
this._obj["displayDebugAreas"] = b;
|
|
this._obj["displayDebugAreas"] = b;
|
|
}
|
|
}
|
|
/** Overrides super.highlight */
|
|
/** Overrides super.highlight */
|
|
- public highlight(b:boolean) {
|
|
|
|
|
|
+ public highlight(b: boolean) {
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
}
|
|
}
|
|
}
|
|
}
|