Commit 82fb46cf authored by 任建锋's avatar 任建锋

Merge branch 'designtime' of http://gitlab2.dui88.com/laoqifeng/zeroing-engine into designtime

parents d51ac915 243f691e
......@@ -25,6 +25,11 @@ export class BitmapText extends Container implements IUIComponent {
@dirtyFieldTrigger
public letterSpacing: number = 0;
constructor() {
super();
this._instanceType = "BitmapText";
}
onModify(value, key) {
switch (key) {
case 'text':
......
......@@ -19,6 +19,7 @@ export class HtmlView extends FloatDisplay implements IUIComponent{
constructor() {
super();
this._instanceType = "HtmlView";
this.afterConstructor();
}
......
......@@ -34,6 +34,11 @@ export class Image extends Sprite implements IUIComponent {
}
}
constructor() {
super();
this._instanceType = "Image";
}
private updateSource() {
let url = this._source;
......
......@@ -18,6 +18,11 @@ export class Label extends TextField implements IUIComponent {
private _registeredEvents = [];
private _htmlText;
constructor() {
super();
this._instanceType = "Label";
}
/**
* 重载文本设置
* @param value
......
......@@ -7,4 +7,8 @@ import {IUIComponent} from "./IUIComponent";
export class Node extends Container implements IUIComponent{
isUI = true;
constructor() {
super();
this._instanceType = "Node";
}
}
\ No newline at end of file
......@@ -14,6 +14,11 @@ export class ScrollListItem extends ScrollListItemBase implements IUIComponent {
view: Container;
constructor() {
super();
this._instanceType = "ScrollListItem";
}
setView(view) {
this.addChild(view);
this.view = view;
......@@ -32,6 +37,7 @@ export class ScrollList extends ScrollListBase {
constructor() {
super();
this._instanceType = "ScrollList";
this.itemClass = ScrollListItem;
......
......@@ -25,6 +25,7 @@ export class ScrollView extends ScrollViewBase implements IUIComponent {
constructor() {
super();
this._instanceType = "ScrollView";
for(let item of proxyMethods){
this[item] = this.viewPort[item].bind(this.viewPort);
......
......@@ -51,6 +51,7 @@ export class TextInput extends Label implements IUIComponent {
constructor() {
super();
this._instanceType = "TextInput";
this.setup();
this.addEventListener(MouseEvent.CLICK, this.onClickStatic, this);
......
......@@ -25,6 +25,7 @@ class ShapeBase extends Graphics implements IUIComponent {
constructor() {
super();
this._instanceType = "ShapeBase";
this.addEventListener(Event.ENTER_FRAME, this.onEnterFrame, this);
this.addEventListener(Event.RESIZE, this.onResize, this);
......@@ -64,6 +65,11 @@ export class Rect extends ShapeBase {
@dirtyFieldDetector
borderRadius: number = 0;
constructor() {
super();
this._instanceType = "Rect";
}
protected redraw() {
const {width, height, borderRadius,} = this;
if(width == 0 || height == 0){
......@@ -81,6 +87,11 @@ export class Rect extends ShapeBase {
* 圆形
*/
export class Circle extends ShapeBase {
constructor() {
super();
this._instanceType = "Circle";
}
protected redraw() {
super.redraw();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment