Commit 241d4727 authored by rockyl's avatar rockyl

修复

parent c91839d7
......@@ -11,7 +11,7 @@ import {Point} from "../../2d/math/Point";
import {alignMgr} from "../decorators/AlignManager";
const propPrefixFilter = ['_', '__', '$'];
const includeProps = ['_width', '_height', 'worldMatrix', 'texture'];
const includeProps = ['_width', '_height', 'worldMatrix'];
const excludeProps = ['eventTypes', 'eventTypes1', 'tempDisplayObjectParent', 'renderable', 'destroyed', 'children', 'start', 'pluginName', 'isUI', 'crossOrigin'];
const propTypeFilter = ['function', 'object'];
const offsetPrefix = 'offset_';
......
......@@ -120,4 +120,12 @@ export class Image extends Sprite implements IUIComponent {
private onDataMutated(e = null) {
this._setSourceDirect(dataCenter.formatString(this._originText, this._escapes));
}
get textureWidth(){
return this._texture ? this._texture.width : 0;
}
get textureHeight(){
return this._texture ? this._texture.height : 0;
}
}
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