最新回答 / superboo
這個最佳的解決方案不是把父類的this.handlers?={};移除 放入到windows因?yàn)楝F(xiàn)在只有這么一個屬性。所以你可以這么做。如果有上百個。你要每個子類都這么寫嗎?那繼承就沒意義了在子類中以子類作用域調(diào)用父類構(gòu)造來解決這個問題子類可以加入:widget.Widget.call(this);
2015-07-25
阿當(dāng)哥,我把窗口定位那里改了一下,應(yīng)該更簡便了;
boundingBox.css({
width : this.cfg.width ,
height : this.cfg.height ,
marginLeft : -(this.cfg.width/2),
marginTop : -(this.cfg.height/2)
});
boundingBox.css({
width : this.cfg.width ,
height : this.cfg.height ,
marginLeft : -(this.cfg.width/2),
marginTop : -(this.cfg.height/2)
});
2015-07-24