Commit 478af1a1 authored by 李纪文's avatar 李纪文

fix: 修改组态

parent 0a4f389b
...@@ -174,7 +174,8 @@ const ConfigurationView = (props) => { ...@@ -174,7 +174,8 @@ const ConfigurationView = (props) => {
case 'valCase': // 实时值模型 case 'valCase': // 实时值模型
const division = node.division || false; const division = node.division || false;
// 动画翻转 // 动画翻转
myDiagram.model.setDataProperty(node, 'flip', go.GraphObject.FlipHorizontal); if (node.effect)
myDiagram.model.setDataProperty(node, 'flip', go.GraphObject.FlipHorizontal);
if (node.shType === '值显示') { if (node.shType === '值显示') {
myDiagram.model.setDataProperty( myDiagram.model.setDataProperty(
node, node,
...@@ -1380,8 +1381,12 @@ const ConfigurationView = (props) => { ...@@ -1380,8 +1381,12 @@ const ConfigurationView = (props) => {
new go.Binding('font', 'fontStyle'), new go.Binding('font', 'fontStyle'),
new go.Binding('stroke', 'fontStroke').makeTwoWay(), new go.Binding('stroke', 'fontStroke').makeTwoWay(),
new go.Binding('textAlign', 'fontAlign'), new go.Binding('textAlign', 'fontAlign'),
new go.Binding('maxSize', 'textSize'), new go.Binding('maxSize', 'size', (v) => {
new go.Binding('minSize', 'textSize'), return new go.Size(parseInt(v.split(' ')[0]) - 0, NaN);
}),
new go.Binding('minSize', 'size', (v) => {
return new go.Size(parseInt(v.split(' ')[0]) - 0, NaN);
}),
), ),
{ {
click(e, node) { click(e, node) {
...@@ -1448,8 +1453,12 @@ const ConfigurationView = (props) => { ...@@ -1448,8 +1453,12 @@ const ConfigurationView = (props) => {
new go.Binding('font', 'fontStyle'), new go.Binding('font', 'fontStyle'),
new go.Binding('stroke', 'fontStroke').makeTwoWay(), new go.Binding('stroke', 'fontStroke').makeTwoWay(),
new go.Binding('textAlign', 'fontAlign'), new go.Binding('textAlign', 'fontAlign'),
new go.Binding('maxSize', 'textSize'), new go.Binding('maxSize', 'size', (v) => {
new go.Binding('minSize', 'textSize'), return new go.Size(parseInt(v.split(' ')[0]) - 0, NaN);
}),
new go.Binding('minSize', 'size', (v) => {
return new go.Size(parseInt(v.split(' ')[0]) - 0, NaN);
}),
), ),
{ {
click(e, node) { click(e, node) {
...@@ -1573,8 +1582,12 @@ const ConfigurationView = (props) => { ...@@ -1573,8 +1582,12 @@ const ConfigurationView = (props) => {
new go.Binding('font', 'fontStyle'), new go.Binding('font', 'fontStyle'),
new go.Binding('stroke', 'fontStroke'), new go.Binding('stroke', 'fontStroke'),
new go.Binding('textAlign', 'fontAlign'), new go.Binding('textAlign', 'fontAlign'),
new go.Binding('maxSize', 'textSize'), new go.Binding('maxSize', 'size', (v) => {
new go.Binding('minSize', 'textSize'), return new go.Size(parseInt(v.split(' ')[0]) - 0, NaN);
}),
new go.Binding('minSize', 'size', (v) => {
return new go.Size(parseInt(v.split(' ')[0]) - 0, NaN);
}),
new go.Binding('flip', 'flip'), new go.Binding('flip', 'flip'),
), ),
{ {
...@@ -1902,8 +1915,12 @@ const ConfigurationView = (props) => { ...@@ -1902,8 +1915,12 @@ const ConfigurationView = (props) => {
new go.Binding('font', 'fontStyle'), new go.Binding('font', 'fontStyle'),
new go.Binding('stroke', 'fontStroke'), new go.Binding('stroke', 'fontStroke'),
new go.Binding('textAlign', 'fontAlign'), new go.Binding('textAlign', 'fontAlign'),
new go.Binding('maxSize', 'textSize'), new go.Binding('maxSize', 'size', (v) => {
new go.Binding('minSize', 'textSize'), return new go.Size(parseInt(v.split(' ')[0]) - 0, NaN);
}),
new go.Binding('minSize', 'size', (v) => {
return new go.Size(parseInt(v.split(' ')[0]) - 0, NaN);
}),
), ),
{ {
click(e, node) { click(e, node) {
......
...@@ -214,7 +214,8 @@ const ConfigurationView = (props) => { ...@@ -214,7 +214,8 @@ const ConfigurationView = (props) => {
case 'valCase': // 实时值模型 case 'valCase': // 实时值模型
const division = node.division || false; const division = node.division || false;
// 动画翻转 // 动画翻转
myDiagram.model.setDataProperty(node, 'flip', go.GraphObject.FlipHorizontal); if (node.effect)
myDiagram.model.setDataProperty(node, 'flip', go.GraphObject.FlipHorizontal);
if (node.shType === '值显示') { if (node.shType === '值显示') {
myDiagram.model.setDataProperty( myDiagram.model.setDataProperty(
node, node,
...@@ -1894,7 +1895,7 @@ const ConfigurationView = (props) => { ...@@ -1894,7 +1895,7 @@ const ConfigurationView = (props) => {
go.TextBlock, go.TextBlock,
textStyle(), textStyle(),
{ {
margin: 5, // margin: 5,
maxSize: new go.Size(NaN, NaN), maxSize: new go.Size(NaN, NaN),
minSize: new go.Size(NaN, 1), minSize: new go.Size(NaN, 1),
wrap: go.TextBlock.WrapFit, wrap: go.TextBlock.WrapFit,
...@@ -1907,8 +1908,12 @@ const ConfigurationView = (props) => { ...@@ -1907,8 +1908,12 @@ const ConfigurationView = (props) => {
new go.Binding('font', 'fontStyle'), new go.Binding('font', 'fontStyle'),
new go.Binding('stroke', 'fontStroke').makeTwoWay(), new go.Binding('stroke', 'fontStroke').makeTwoWay(),
new go.Binding('textAlign', 'fontAlign'), new go.Binding('textAlign', 'fontAlign'),
new go.Binding('maxSize', 'textSize'), new go.Binding('maxSize', 'size', (v) => {
new go.Binding('minSize', 'textSize'), return new go.Size(parseInt(v.split(' ')[0]) - 0, NaN);
}),
new go.Binding('minSize', 'size', (v) => {
return new go.Size(parseInt(v.split(' ')[0]) - 0, NaN);
}),
), ),
{ {
click(e, node) { click(e, node) {
...@@ -1968,7 +1973,7 @@ const ConfigurationView = (props) => { ...@@ -1968,7 +1973,7 @@ const ConfigurationView = (props) => {
go.TextBlock, go.TextBlock,
textStyle(), textStyle(),
{ {
margin: 5, // margin: 5,
maxSize: new go.Size(NaN, NaN), maxSize: new go.Size(NaN, NaN),
minSize: new go.Size(NaN, 1), minSize: new go.Size(NaN, 1),
wrap: go.TextBlock.WrapFit, wrap: go.TextBlock.WrapFit,
...@@ -1981,8 +1986,12 @@ const ConfigurationView = (props) => { ...@@ -1981,8 +1986,12 @@ const ConfigurationView = (props) => {
new go.Binding('font', 'fontStyle'), new go.Binding('font', 'fontStyle'),
new go.Binding('stroke', 'fontStroke').makeTwoWay(), new go.Binding('stroke', 'fontStroke').makeTwoWay(),
new go.Binding('textAlign', 'fontAlign'), new go.Binding('textAlign', 'fontAlign'),
new go.Binding('maxSize', 'textSize'), new go.Binding('maxSize', 'size', (v) => {
new go.Binding('minSize', 'textSize'), return new go.Size(parseInt(v.split(' ')[0]) - 0, NaN);
}),
new go.Binding('minSize', 'size', (v) => {
return new go.Size(parseInt(v.split(' ')[0]) - 0, NaN);
}),
), ),
{ {
click(e, node) { click(e, node) {
...@@ -2121,8 +2130,12 @@ const ConfigurationView = (props) => { ...@@ -2121,8 +2130,12 @@ const ConfigurationView = (props) => {
new go.Binding('font', 'fontStyle'), new go.Binding('font', 'fontStyle'),
new go.Binding('stroke', 'fontStroke'), new go.Binding('stroke', 'fontStroke'),
new go.Binding('textAlign', 'fontAlign'), new go.Binding('textAlign', 'fontAlign'),
new go.Binding('maxSize', 'textSize'), new go.Binding('maxSize', 'size', (v) => {
new go.Binding('minSize', 'textSize'), return new go.Size(parseInt(v.split(' ')[0]) - 0, NaN);
}),
new go.Binding('minSize', 'size', (v) => {
return new go.Size(parseInt(v.split(' ')[0]) - 0, NaN);
}),
new go.Binding('flip', 'flip'), new go.Binding('flip', 'flip'),
), ),
{ {
...@@ -2456,8 +2469,12 @@ const ConfigurationView = (props) => { ...@@ -2456,8 +2469,12 @@ const ConfigurationView = (props) => {
new go.Binding('font', 'fontStyle'), new go.Binding('font', 'fontStyle'),
new go.Binding('stroke', 'fontStroke'), new go.Binding('stroke', 'fontStroke'),
new go.Binding('textAlign', 'fontAlign'), new go.Binding('textAlign', 'fontAlign'),
new go.Binding('maxSize', 'textSize'), new go.Binding('maxSize', 'size', (v) => {
new go.Binding('minSize', 'textSize'), return new go.Size(parseInt(v.split(' ')[0]) - 0, NaN);
}),
new go.Binding('minSize', 'size', (v) => {
return new go.Size(parseInt(v.split(' ')[0]) - 0, NaN);
}),
), ),
{ {
click(e, node) { click(e, node) {
......
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