Refactoring to enhance the SyntaxNode extending

This commit is contained in:
Jeff Avallone
2014-12-17 11:53:04 -05:00
parent 6322b48f31
commit 57ccd4b0c5
12 changed files with 75 additions and 65 deletions
+9 -7
View File
@@ -1,8 +1,6 @@
import _ from 'lodash';
import Q from 'q';
import Base from './base.js';
export default _.extend({}, Base, {
export default {
type: 'charset',
_render() {
@@ -31,14 +29,18 @@ export default _.extend({}, Base, {
},
_getAnchor() {
var matrix = this.transform().localMatrix;
var box = this.container.getBBox(),
matrix = this.transform().localMatrix;
return _.extend(Base._getAnchor.call(this), {
return {
atype: this.type,
ax: box.x,
ax2: box.x2,
ay: matrix.y(0, this.partContainer.getBBox().cy)
});
};
},
invert() {
return this._invert.textValue !== '';
}
});
};