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

fix: 修改组态

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