Skip to content

Commit

Permalink
提交标绘产品属性面板
Browse files Browse the repository at this point in the history
  • Loading branch information
hhyu1 committed Jul 17, 2024
1 parent 66cbdfc commit 9a75901
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 22 deletions.
14 changes: 0 additions & 14 deletions examples/data/plot-sign/signManager.json

This file was deleted.

6 changes: 4 additions & 2 deletions examples/js/plottingPanel/PublicStyleFunction.js
Original file line number Diff line number Diff line change
Expand Up @@ -1371,7 +1371,8 @@ function symbolPropertyObject(selectfeature, styleObject) {
var objectSubCode1 = new Object();
objectSubCode1.group = group[8];
objectSubCode1.name = displayName[3];
objectSubCode1.editor = { "type": 'combobox', "options": { "valueField": 'value', "textField": 'text', "data": getSubSymbolsTypeRows(selectfeature) } };
objectSubCode1.editor = "text";
//objectSubCode1.editor = { "type": 'combobox', "options": { "valueField": 'value', "textField": 'text', "data": getSubSymbolsTypeRows(selectfeature) } };
objectSubCode1.index = i;
objectSubCode1.value = subSymbolsTypeString(selectfeature.getSubSymbols().length, selectfeature,i);
algoSymbolRows.push(objectSubCode1);
Expand All @@ -1395,7 +1396,8 @@ function symbolPropertyObject(selectfeature, styleObject) {
var objectSubCode = new Object();
objectSubCode.group = group[8];
objectSubCode.name = displayName[3];
objectSubCode.editor = { "type": 'combobox', "options": { "valueField": 'value', "textField": 'text', "data": getSubSymbolsTypeRows(selectfeature) } };
objectSubCode.editor = "text";
//objectSubCode.editor = { "type": 'combobox', "options": { "valueField": 'value', "textField": 'text', "data": getSubSymbolsTypeRows(selectfeature) } };
objectSubCode.index = i;
objectSubCode.value = selectfeature.getSubSymbols()[i].code;
algoSymbolRows.push(objectSubCode);
Expand Down
8 changes: 6 additions & 2 deletions examples/js/plottingPanel/SignSymbolPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,11 @@ function updateSelectSignSymbol(updated, signSymbol) {
values = updated.value.split(";")
} else if (updated.value.includes(";")) {
values = updated.value.split(";")
} else {
} else if (updated.value.includes(",")) {
values = updated.value.split(",")
} else if (updated.value.includes(",")) {
values = updated.value.split(",")
} else {
values = [updated.value];
}
signSymbol.setTexts(values);
Expand Down Expand Up @@ -525,7 +529,7 @@ function updateSelectSignSymbol(updated, signSymbol) {
transInfo.redoParams = [updated.value];
c = signSymbol.getIndecatorLineStyle().color;
if (c.includes("#")) {
signSymbol.setIndecatorLineStyle({ lineColor: hexToRgb(c, updated.value) });
signSymbol.setIndecatorLineStyle({ lineColor: hexToRgb(c, updated.value), opacity: parseFloat(updated.value) });
} else {
color = colorConvert(c);
let hexColor = rgbToHex(color.red, color.green, color.blue);
Expand Down
13 changes: 9 additions & 4 deletions examples/js/plottingPanel/StylePanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ function updateSelectFeature(updated, selectfeatures) {
if (selectfeatures[i].symbolType === SuperMap.Plot.SymbolType.LITERATESIGN) {
selectfeatures[i].route.applyTextStyle({ lineSymbolID: updated.value });
} else {
if(selectfeatures[i].symbolType != 1){
if(selectfeatures[i].symbolType != 1 && selectfeatures[i].setDashLine){
selectfeatures[i].setDashLine([]);
selectfeatures[i].setStyle({ lineSymbolID: 0 });
}
Expand Down Expand Up @@ -703,6 +703,9 @@ function updateSelectFeature(updated, selectfeatures) {
}
else if (code !== null) {

var symbolLibManager = L.supermap.plotting.symbolLibManager(serverUrl);
var subCode = symbolLibManager.findSymbolByCode(code);

transInfo.functionName = "setSubSymbol";
if (selectfeatures[i].getSubSymbols()[updated.index]) {
transInfo.undoParams = [selectfeatures[i].getSubSymbols()[updated.index].code, updated.index, selectfeatures[i].getSubSymbols()[updated.index].libID];
Expand All @@ -712,16 +715,18 @@ function updateSelectFeature(updated, selectfeatures) {
var subSymbol = selectfeatures[i].getSubSymbols()[updated.index];

transInfo.redoParams = [code, updated.index];
selectfeatures[i].setSubSymbol(code, updated.index, 100);
selectfeatures[i].setSubSymbol(code, updated.index, subCode[0].libID);
}
}
var symbolLibManager = L.supermap.plotting.symbolLibManager(serverUrl);
var subCode = symbolLibManager.findSymbolByCode(subSymbol.code);
if (updated.name == resources.text_subSymbolLineWidth) {
let subSymbol = selectfeatures[i].getSubSymbols()[updated.index];
selectfeatures[i].setSubSymbol(subSymbol.code, updated.index, 100, subSymbol.lineColor, parseFloat(updated.value));
selectfeatures[i].setSubSymbol(subSymbol.code, updated.index, subCode[0].libID, subSymbol.lineColor, parseFloat(updated.value));
}
if (updated.name == resources.text_subSymbolLineColor) {
let subSymbol = selectfeatures[i].getSubSymbols()[updated.index];
selectfeatures[i].setSubSymbol(subSymbol.code, updated.index, 100, updated.value, subSymbol.width2D);
selectfeatures[i].setSubSymbol(subSymbol.code, updated.index, subCode[0].libID, updated.value, subSymbol.width2D);
}
}
transaction.transInfos.push(transInfo);
Expand Down

0 comments on commit 9a75901

Please sign in to comment.