Commit f0779f86 authored by rockyl's avatar rockyl

Merge remote-tracking branch 'origin/dev' into dev

parents 0fbdd4b4 9fbdf5e6
......@@ -156,9 +156,6 @@ export const projectStore = {
});
}
console.log('newView', newView);
// curOperate.push(_.cloneDeep(newView)) // 保存操作之后的配置
// 在操作栈中插入最新值
state.operateStack.unshift(_.cloneDeep(newView));
// 超过最大保存数就丢弃
......
......@@ -265,14 +265,6 @@ export const styles = {
});
}
if (cmpSelfProps.scaleX) {
cmpSelfProps.width *= cmpSelfProps.scaleX;
}
if (cmpSelfProps.scaleY) {
cmpSelfProps.height *= cmpSelfProps.scaleY;
}
// 获取拖拽组件的样式,只生成operatProps中的属性
if (onlyOpera) {
_.forIn(cmpSelfProps, (val, key) => {
......@@ -280,6 +272,18 @@ export const styles = {
delete cmpSelfProps[key];
}
});
// 如果节点的width/height未定义,则设置拖拽组件的width/height为0
cmpSelfProps.width = cmpSelfProps.width || 0;
cmpSelfProps.height = cmpSelfProps.height || 0;
}
if (cmpSelfProps.scaleX && cmpSelfProps.width) {
cmpSelfProps.width *= cmpSelfProps.scaleX;
}
if (cmpSelfProps.scaleY && cmpSelfProps.height) {
cmpSelfProps.height *= cmpSelfProps.scaleY;
}
// 把不需要参与样式计算的属性干掉
......@@ -308,6 +312,11 @@ export const styles = {
result += 'border-radius: 50%;'
}
if (component.type === 'label' && !onlyOpera) {
// 如果是label类型,禁止自动换行
result += 'word-break: keep-all;'
}
// console.log('getComponentStyle',component.name, result);
return result;
}
......
......@@ -36,12 +36,12 @@ export default {
width: {
title: '宽度',
type: 'inputNumber',
value: 1
value: undefined
},
height: {
title: '高度',
type: 'inputNumber',
value: 1
value: undefined
},
horizonCenter: {
title: '水平偏移',
......
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