Commit 7b392339 authored by 李纪文's avatar 李纪文

fix: 组态图片路径及文字位置生效

parent 7f0ffbe5
...@@ -957,7 +957,7 @@ const ConfigurationView = (props) => { ...@@ -957,7 +957,7 @@ const ConfigurationView = (props) => {
{ width: 56, height: 56, scale: 1, source: '', background: '#2e3343' }, { width: 56, height: 56, scale: 1, source: '', background: '#2e3343' },
new go.Binding('source', 'imgSrc', function (v) { new go.Binding('source', 'imgSrc', function (v) {
return v return v
? `/PandaCore/GCK/SketchPad/PreviewResource?name=${v}&_site=${ ? `/PandaMonitor/Monitor/SketchPad/PreviewResource?name=${v}&_site=${
globalConfig?.userInfo?.LocalSite || '' globalConfig?.userInfo?.LocalSite || ''
}` }`
: ''; : '';
...@@ -1006,7 +1006,7 @@ const ConfigurationView = (props) => { ...@@ -1006,7 +1006,7 @@ const ConfigurationView = (props) => {
new go.Binding('source', 'imgSrc', function (v) { new go.Binding('source', 'imgSrc', function (v) {
return !v return !v
? require('./images/组态/默认.png') ? require('./images/组态/默认.png')
: `/PandaCore/GCK/SketchPad/PreviewResource?name=${v}&_site=${ : `/PandaMonitor/Monitor/SketchPad/PreviewResource?name=${v}&_site=${
globalConfig?.userInfo?.LocalSite || '' globalConfig?.userInfo?.LocalSite || ''
}`; }`;
}).makeTwoWay(), }).makeTwoWay(),
...@@ -1195,6 +1195,8 @@ const ConfigurationView = (props) => { ...@@ -1195,6 +1195,8 @@ 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('minSize', 'textSize'),
), ),
{ {
click(e, node) { click(e, node) {
...@@ -1261,6 +1263,8 @@ const ConfigurationView = (props) => { ...@@ -1261,6 +1263,8 @@ 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('minSize', 'textSize'),
), ),
{ {
click(e, node) { click(e, node) {
...@@ -1383,6 +1387,8 @@ const ConfigurationView = (props) => { ...@@ -1383,6 +1387,8 @@ 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('minSize', 'textSize'),
), ),
{ {
click(e, node) { click(e, node) {
...@@ -1709,6 +1715,8 @@ const ConfigurationView = (props) => { ...@@ -1709,6 +1715,8 @@ 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('minSize', 'textSize'),
), ),
{ {
click(e, node) { click(e, node) {
......
...@@ -1376,7 +1376,7 @@ const ConfigurationView = (props) => { ...@@ -1376,7 +1376,7 @@ const ConfigurationView = (props) => {
{ width: 56, height: 56, scale: 1, source: '', background: '#2e3343' }, { width: 56, height: 56, scale: 1, source: '', background: '#2e3343' },
new go.Binding('source', 'imgSrc', function (v) { new go.Binding('source', 'imgSrc', function (v) {
return v return v
? `/PandaCore/GCK/SketchPad/PreviewResource?name=${v}&_site=${ ? `/PandaMonitor/Monitor/SketchPad/PreviewResource?name=${v}&_site=${
globalConfig?.userInfo?.LocalSite || '' globalConfig?.userInfo?.LocalSite || ''
}` }`
: ''; : '';
...@@ -1425,7 +1425,7 @@ const ConfigurationView = (props) => { ...@@ -1425,7 +1425,7 @@ const ConfigurationView = (props) => {
new go.Binding('source', 'imgSrc', function (v) { new go.Binding('source', 'imgSrc', function (v) {
return !v return !v
? require('./images/组态/默认.png') ? require('./images/组态/默认.png')
: `/PandaCore/GCK/SketchPad/PreviewResource?name=${v}&_site=${ : `/PandaMonitor/Monitor/SketchPad/PreviewResource?name=${v}&_site=${
globalConfig?.userInfo?.LocalSite || '' globalConfig?.userInfo?.LocalSite || ''
}`; }`;
}).makeTwoWay(), }).makeTwoWay(),
...@@ -1628,6 +1628,8 @@ const ConfigurationView = (props) => { ...@@ -1628,6 +1628,8 @@ 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('minSize', 'textSize'),
), ),
{ {
click(e, node) { click(e, node) {
...@@ -1697,6 +1699,8 @@ const ConfigurationView = (props) => { ...@@ -1697,6 +1699,8 @@ 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('minSize', 'textSize'),
), ),
{ {
click(e, node) { click(e, node) {
...@@ -1831,6 +1835,8 @@ const ConfigurationView = (props) => { ...@@ -1831,6 +1835,8 @@ 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('minSize', 'textSize'),
), ),
{ {
click(e, node) { click(e, node) {
...@@ -2163,6 +2169,8 @@ const ConfigurationView = (props) => { ...@@ -2163,6 +2169,8 @@ 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('minSize', 'textSize'),
), ),
{ {
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