Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lively.morphic/components/policy.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { Icons } from '../text/icons.js';

const skippedValue = Symbol.for('lively.skip-property');
const PROPS_TO_RESET = ['dropShadow', 'fill', 'opacity', 'borderWidth', 'fontColor'];
const TRANSFORM_PROPS = ['extent', 'position', 'rotation', 'scale', 'lineHeight'];
const TEXT_TYPES = ['text', 'label', Text, Label];
const expressionSerializer = new ExpressionSerializer();

Expand Down Expand Up @@ -1196,7 +1197,6 @@ export class StylePolicy {
*/
synthesizeSubSpec (submorphNameInPolicyContext, ownerOfScope, previousTarget) {
const isRoot = !submorphNameInPolicyContext;
const transformProps = ['extent', 'position', 'scale', 'lineHeight'];
let subSpec = this.getSubSpecFor(submorphNameInPolicyContext) || {}; // get the sub spec for the submorphInPolicyContext

if (subSpec.isPolicy) {
Expand Down Expand Up @@ -1225,7 +1225,7 @@ export class StylePolicy {
}

if (isRoot) {
for (let prop of transformProps) {
for (let prop of TRANSFORM_PROPS) {
if (parentSpec[prop]) delete nextLevelSpec[prop];
}
}
Expand Down