Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wisdom-components
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ReactWeb5
wisdom-components
Commits
478af1a1
Commit
478af1a1
authored
Jul 03, 2023
by
李纪文
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改组态
parent
0a4f389b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
20 deletions
+54
-20
HistoryModel.js
...xtend-components/EC_ConfigurationView/src/HistoryModel.js
+26
-9
RealModel.js
...s/extend-components/EC_ConfigurationView/src/RealModel.js
+28
-11
No files found.
packages/extend-components/EC_ConfigurationView/src/HistoryModel.js
View file @
478af1a1
...
...
@@ -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) {
...
...
packages/extend-components/EC_ConfigurationView/src/RealModel.js
View file @
478af1a1
...
...
@@ -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) {
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment