Skip to content

Commit 9a75901

Browse files
committed
提交标绘产品属性面板
1 parent 66cbdfc commit 9a75901

File tree

4 files changed

+19
-22
lines changed

4 files changed

+19
-22
lines changed

examples/data/plot-sign/signManager.json

Lines changed: 0 additions & 14 deletions
This file was deleted.

examples/js/plottingPanel/PublicStyleFunction.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1371,7 +1371,8 @@ function symbolPropertyObject(selectfeature, styleObject) {
13711371
var objectSubCode1 = new Object();
13721372
objectSubCode1.group = group[8];
13731373
objectSubCode1.name = displayName[3];
1374-
objectSubCode1.editor = { "type": 'combobox', "options": { "valueField": 'value', "textField": 'text', "data": getSubSymbolsTypeRows(selectfeature) } };
1374+
objectSubCode1.editor = "text";
1375+
//objectSubCode1.editor = { "type": 'combobox', "options": { "valueField": 'value', "textField": 'text', "data": getSubSymbolsTypeRows(selectfeature) } };
13751376
objectSubCode1.index = i;
13761377
objectSubCode1.value = subSymbolsTypeString(selectfeature.getSubSymbols().length, selectfeature,i);
13771378
algoSymbolRows.push(objectSubCode1);
@@ -1395,7 +1396,8 @@ function symbolPropertyObject(selectfeature, styleObject) {
13951396
var objectSubCode = new Object();
13961397
objectSubCode.group = group[8];
13971398
objectSubCode.name = displayName[3];
1398-
objectSubCode.editor = { "type": 'combobox', "options": { "valueField": 'value', "textField": 'text', "data": getSubSymbolsTypeRows(selectfeature) } };
1399+
objectSubCode.editor = "text";
1400+
//objectSubCode.editor = { "type": 'combobox', "options": { "valueField": 'value', "textField": 'text', "data": getSubSymbolsTypeRows(selectfeature) } };
13991401
objectSubCode.index = i;
14001402
objectSubCode.value = selectfeature.getSubSymbols()[i].code;
14011403
algoSymbolRows.push(objectSubCode);

examples/js/plottingPanel/SignSymbolPanel.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,11 @@ function updateSelectSignSymbol(updated, signSymbol) {
274274
values = updated.value.split(";")
275275
} else if (updated.value.includes(";")) {
276276
values = updated.value.split(";")
277-
} else {
277+
} else if (updated.value.includes(",")) {
278+
values = updated.value.split(",")
279+
} else if (updated.value.includes(",")) {
280+
values = updated.value.split(",")
281+
} else {
278282
values = [updated.value];
279283
}
280284
signSymbol.setTexts(values);
@@ -525,7 +529,7 @@ function updateSelectSignSymbol(updated, signSymbol) {
525529
transInfo.redoParams = [updated.value];
526530
c = signSymbol.getIndecatorLineStyle().color;
527531
if (c.includes("#")) {
528-
signSymbol.setIndecatorLineStyle({ lineColor: hexToRgb(c, updated.value) });
532+
signSymbol.setIndecatorLineStyle({ lineColor: hexToRgb(c, updated.value), opacity: parseFloat(updated.value) });
529533
} else {
530534
color = colorConvert(c);
531535
let hexColor = rgbToHex(color.red, color.green, color.blue);

examples/js/plottingPanel/StylePanel.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ function updateSelectFeature(updated, selectfeatures) {
170170
if (selectfeatures[i].symbolType === SuperMap.Plot.SymbolType.LITERATESIGN) {
171171
selectfeatures[i].route.applyTextStyle({ lineSymbolID: updated.value });
172172
} else {
173-
if(selectfeatures[i].symbolType != 1){
173+
if(selectfeatures[i].symbolType != 1 && selectfeatures[i].setDashLine){
174174
selectfeatures[i].setDashLine([]);
175175
selectfeatures[i].setStyle({ lineSymbolID: 0 });
176176
}
@@ -703,6 +703,9 @@ function updateSelectFeature(updated, selectfeatures) {
703703
}
704704
else if (code !== null) {
705705

706+
var symbolLibManager = L.supermap.plotting.symbolLibManager(serverUrl);
707+
var subCode = symbolLibManager.findSymbolByCode(code);
708+
706709
transInfo.functionName = "setSubSymbol";
707710
if (selectfeatures[i].getSubSymbols()[updated.index]) {
708711
transInfo.undoParams = [selectfeatures[i].getSubSymbols()[updated.index].code, updated.index, selectfeatures[i].getSubSymbols()[updated.index].libID];
@@ -712,16 +715,18 @@ function updateSelectFeature(updated, selectfeatures) {
712715
var subSymbol = selectfeatures[i].getSubSymbols()[updated.index];
713716

714717
transInfo.redoParams = [code, updated.index];
715-
selectfeatures[i].setSubSymbol(code, updated.index, 100);
718+
selectfeatures[i].setSubSymbol(code, updated.index, subCode[0].libID);
716719
}
717720
}
721+
var symbolLibManager = L.supermap.plotting.symbolLibManager(serverUrl);
722+
var subCode = symbolLibManager.findSymbolByCode(subSymbol.code);
718723
if (updated.name == resources.text_subSymbolLineWidth) {
719724
let subSymbol = selectfeatures[i].getSubSymbols()[updated.index];
720-
selectfeatures[i].setSubSymbol(subSymbol.code, updated.index, 100, subSymbol.lineColor, parseFloat(updated.value));
725+
selectfeatures[i].setSubSymbol(subSymbol.code, updated.index, subCode[0].libID, subSymbol.lineColor, parseFloat(updated.value));
721726
}
722727
if (updated.name == resources.text_subSymbolLineColor) {
723728
let subSymbol = selectfeatures[i].getSubSymbols()[updated.index];
724-
selectfeatures[i].setSubSymbol(subSymbol.code, updated.index, 100, updated.value, subSymbol.width2D);
729+
selectfeatures[i].setSubSymbol(subSymbol.code, updated.index, subCode[0].libID, updated.value, subSymbol.width2D);
725730
}
726731
}
727732
transaction.transInfos.push(transInfo);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy