Commit ce8909d2 authored by 任建锋's avatar 任建锋

--

parent f76f34d4
This diff is collapsed.
This diff is collapsed.
...@@ -117,9 +117,11 @@ export class Loader extends EventDispatcher { ...@@ -117,9 +117,11 @@ export class Loader extends EventDispatcher {
//console.log("覆盖原先数据:" + name); //console.log("覆盖原先数据:" + name);
} }
this.caches[name] = data; this.caches[name] = data;
console.log(this.caches)
} }
get(name: string) { get(name: string) {
console.log(this.caches)
return this.caches[name]; return this.caches[name];
} }
} }
......
...@@ -63,7 +63,12 @@ export class ObservablePoint extends HashObject { ...@@ -63,7 +63,12 @@ export class ObservablePoint extends HashObject {
set x(value) { set x(value) {
if (this._x !== value) { if (this._x !== value) {
if(value){
this._x = value; this._x = value;
}else{
this._x = 0;
}
this.cb.call(this.scope); this.cb.call(this.scope);
} }
} }
...@@ -74,7 +79,11 @@ export class ObservablePoint extends HashObject { ...@@ -74,7 +79,11 @@ export class ObservablePoint extends HashObject {
set y(value) { set y(value) {
if (this._y !== value) { if (this._y !== value) {
if(value){
this._y = value; this._y = value;
}else{
this._y = 0;
}
this.cb.call(this.scope); this.cb.call(this.scope);
} }
} }
......
...@@ -141,7 +141,7 @@ export class EditorStage extends Node { ...@@ -141,7 +141,7 @@ export class EditorStage extends Node {
let node = this.hitTestPoint(globalPos, true); let node = this.hitTestPoint(globalPos, true);
//console.log(globalPos.x, globalPos.y, node ? node.name : ''); console.log(globalPos.x, globalPos.y, node ? node.name : '');
return node; return node;
} }
......
...@@ -36,6 +36,7 @@ export class Image extends Sprite implements IUIComponent { ...@@ -36,6 +36,7 @@ export class Image extends Sprite implements IUIComponent {
private updateSource() { private updateSource() {
let url = this._source; let url = this._source;
if (url) { if (url) {
if (url.indexOf('://') >= 0) { //如果是有协议的地址 if (url.indexOf('://') >= 0) { //如果是有协议的地址
if (url.indexOf(assetScheme) === 0) { if (url.indexOf(assetScheme) === 0) {
...@@ -47,6 +48,7 @@ export class Image extends Sprite implements IUIComponent { ...@@ -47,6 +48,7 @@ export class Image extends Sprite implements IUIComponent {
}*/ }*/
if (editorMode) { if (editorMode) {
console.log("assetResolver(url)",assetResolver(url))
url = assetResolver(url); url = assetResolver(url);
} }
} }
...@@ -63,6 +65,7 @@ export class Image extends Sprite implements IUIComponent { ...@@ -63,6 +65,7 @@ export class Image extends Sprite implements IUIComponent {
} }
private _setSourceDirect(value) { private _setSourceDirect(value) {
this._source = value; this._source = value;
this.updateSource(); this.updateSource();
......
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