|
|
|
@ -17,6 +17,7 @@ function getPosition(object) {
|
|
|
|
|
|
|
|
|
|
module.exports = function createCompositeObject(options) {
|
|
|
|
|
let mapProperties = createPropertyMapper(options.propertyMap);
|
|
|
|
|
let initialPropertySet = mapProperties(options);
|
|
|
|
|
|
|
|
|
|
let compositeObject = createObject(Object.assign({
|
|
|
|
|
onSet: function setCompositeProperties(properties) {
|
|
|
|
@ -77,7 +78,7 @@ module.exports = function createCompositeObject(options) {
|
|
|
|
|
offsetY: y1
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}, options));
|
|
|
|
|
}, initialPropertySet._));
|
|
|
|
|
|
|
|
|
|
Object.keys(compositeObject.objects).forEach((objectName) => {
|
|
|
|
|
compositeObject.objects[objectName].on("recalculatedSize", () => {
|
|
|
|
@ -89,5 +90,6 @@ module.exports = function createCompositeObject(options) {
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
compositeObject.set(options);
|
|
|
|
|
return compositeObject;
|
|
|
|
|
};
|
|
|
|
|