Skip to content

Commit

Permalink
Merge pull request #120 from keichan34/2024-001-multiline-multipoint-…
Browse files Browse the repository at this point in the history
…editing
  • Loading branch information
johofukyu authored Aug 27, 2024
2 parents 8c549de + 065dc30 commit d1a7b01
Showing 1 changed file with 39 additions and 9 deletions.
48 changes: 39 additions & 9 deletions js/gsimaps.js
Original file line number Diff line number Diff line change
Expand Up @@ -39265,6 +39265,7 @@ GSI.SakuzuListItem = L.Evented.extend({
break;

case GSI.SakuzuListItem.LINESTRING:
case GSI.SakuzuListItem.MULTILINESTRING:
case GSI.SakuzuListItem.FREEHAND:
result = L.polyline(this._cloneLatLngs(layer.getLatLngs()), layer.options);
result.feature = layer.feature;
Expand All @@ -39284,7 +39285,6 @@ GSI.SakuzuListItem = L.Evented.extend({
result = L.circle(latlng, radius, layer.options);
break;

case GSI.SakuzuListItem.MULTILINESTRING:
case GSI.SakuzuListItem.MULTIPOINT:
result = L.featureGroup();
result.feature = layer.feature;
Expand Down Expand Up @@ -39362,6 +39362,9 @@ GSI.SakuzuListItem = L.Evented.extend({
case "LineString":
itemType = GSI.SakuzuListItem.LINESTRING;
break;
case "MultiLineString":
itemType = GSI.SakuzuListItem.MULTILINESTRING;
break;
}
}
}
Expand Down Expand Up @@ -40996,7 +40999,6 @@ GSI.SakuzuListItem = L.Evented.extend({
break;

case GSI.SakuzuListItem.MULTIPOINT:
case GSI.SakuzuListItem.MULTILINESTRING:
var layers = targetLayer.getLayers();
if (clearPathList) this._editingPathList = [];
for (var i = 0; i < layers.length; i++) {
Expand Down Expand Up @@ -42226,7 +42228,7 @@ GSI.SakuzuListItem = L.Evented.extend({
result.properties = this._layerInfo2Properties(this._getLayerInfo(layer));

var options = layer.options;
if (!options && layer.getLayers) {
if ((!options || Object.keys(options).length === 0) && layer.getLayers) {
var layers = layer.getLayers();
if (layers.length > 0) {
options = layers[0].options;
Expand Down Expand Up @@ -42343,6 +42345,10 @@ GSI.SakuzuListItem.typeToTitle = function(drawType) {
result = "マーカー(アイコン)";
break;

case GSI.SakuzuListItem.MULTIPOINT:
result = "マーカー(アイコン)(マルチパート)";
break;

case GSI.SakuzuListItem.POINT_CIRCLE:
result = "マーカー(円)";
break;
Expand All @@ -42355,6 +42361,10 @@ GSI.SakuzuListItem.typeToTitle = function(drawType) {
result = "線";
break;

case GSI.SakuzuListItem.MULTILINESTRING:
result = "線(マルチパート)";
break;

case GSI.SakuzuListItem.POLYGON:
result = "ポリゴン";
break;
Expand All @@ -42368,7 +42378,7 @@ GSI.SakuzuListItem.typeToTitle = function(drawType) {
break;

case GSI.SakuzuListItem.MULTIPOLYGON:
result = "マルチポリゴン";
result = "ポリゴン(マルチパート)";
break;

default:
Expand Down Expand Up @@ -44093,8 +44103,11 @@ GSI.SakuzuInfoEditDialog = GSI.Dialog.extend({
this._container = $("<div>");

// マーカー編集
if (this._drawType == GSI.SakuzuListItem.POINT ||
this._drawType == GSI.SakuzuListItem.POINT_TEXT) {
if (
this._drawType == GSI.SakuzuListItem.POINT ||
this._drawType == GSI.SakuzuListItem.POINT_TEXT ||
this._drawType == GSI.SakuzuListItem.MULTIPOINT
) {
this._markerEditPanel = this._createMarkerEditPanel();
this._container.append( this._markerEditPanel);
}
Expand All @@ -44111,7 +44124,10 @@ GSI.SakuzuInfoEditDialog = GSI.Dialog.extend({
}

// ライン編集
if ( this._drawType == GSI.SakuzuListItem.LINESTRING) {
if (
this._drawType == GSI.SakuzuListItem.LINESTRING ||
this._drawType == GSI.SakuzuListItem.MULTILINESTRING
) {
this._lineEditPanel = this._createLineEditPanel();
this._container.append( this._lineEditPanel);
}
Expand Down Expand Up @@ -44145,9 +44161,20 @@ GSI.SakuzuInfoEditDialog = GSI.Dialog.extend({
// 値リセット
_resetView : function() {
// マーカー編集部
if(this._drawType == GSI.SakuzuListItem.POINT || this._drawType == GSI.SakuzuListItem.POINT_TEXT) {
if(
this._drawType == GSI.SakuzuListItem.POINT ||
this._drawType == GSI.SakuzuListItem.POINT_TEXT
) {
this._refreshMarkerEditPanel(this._layer.options);
}
// MultiPointはマーカー編集部だが、FeatureGroupに格納されているので、最初のMarkerから
// optionsを読み込む必要がある。
if (
this._drawType == GSI.SakuzuListItem.MULTIPOINT
) {
var options = this._layer.getLayers()[0].options;
this._refreshMarkerEditPanel(options);
}
// 円編集部
if ( this._drawType == GSI.SakuzuListItem.POINT_CIRCLE ||
this._drawType == GSI.SakuzuListItem.CIRCLE ) {
Expand All @@ -44156,7 +44183,10 @@ GSI.SakuzuInfoEditDialog = GSI.Dialog.extend({
this._refreshCircleEditPanel( this._layer.options);
}
// ライン編集部
if ( this._drawType == GSI.SakuzuListItem.LINESTRING ) {
if (
this._drawType == GSI.SakuzuListItem.LINESTRING ||
this._drawType == GSI.SakuzuListItem.MULTILINESTRING
) {
this._refreshLineEditPanel( this._layer.options);
}
// ポリゴン編集部
Expand Down

0 comments on commit d1a7b01

Please sign in to comment.