mapping-component-package-jp 0.1.6 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -16,6 +16,7 @@ export class MapOverlayManager {
|
|
|
16
16
|
Shape_Delete(ShapeId: string | number, EventHandlers?: any): void;
|
|
17
17
|
Shape_DeleteAll(isMobile?: boolean): void;
|
|
18
18
|
Shape_Convert(ShapeId: string | number): string;
|
|
19
|
+
SelectedShape_GetType(ShapeId: string | number, shapeTypes: any): string;
|
|
19
20
|
|
|
20
21
|
// Rendering Methods
|
|
21
22
|
RenderFields(locations: any[], properties: any, editMode?: boolean): void;
|
|
@@ -43,6 +44,7 @@ export class MapOverlayManager {
|
|
|
43
44
|
// Field Management
|
|
44
45
|
TriggerField_ChangeEvent(): any;
|
|
45
46
|
DrawField_AttachEvents(eHandlers: any): void;
|
|
47
|
+
DrawField_DetachEvents(StrokeColor: string, SelectedShapeId: string): void;
|
|
46
48
|
clearBackgroundFields(): void;
|
|
47
49
|
checkForBackgroundFieldOverlaps(): boolean;
|
|
48
50
|
|
|
@@ -620,6 +620,22 @@ export class MapOverlayManager {
|
|
|
620
620
|
|
|
621
621
|
}
|
|
622
622
|
|
|
623
|
+
_this.SelectedShape_GetType = function (ShapeId, shapeTypes) {
|
|
624
|
+
var polygon = locPolygons.find(p => p.id == ShapeId);
|
|
625
|
+
|
|
626
|
+
if (polygon.id == ShapeId) {
|
|
627
|
+
if (polygon.isPolygon) {
|
|
628
|
+
return shapeTypes.ShapeTypeId_Polygon;
|
|
629
|
+
} else if (polygon.isCircle) {
|
|
630
|
+
return shapeTypes.ShapeTypeId_Circle;
|
|
631
|
+
} else if (polygon.isCircleSector) {
|
|
632
|
+
return shapeTypes.ShapeTypeId_CircleSector;
|
|
633
|
+
} else if (polygon.isCircleSegment) {
|
|
634
|
+
return shapeTypes.ShapeTypeId_CircleSegment;
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
|
|
623
639
|
|
|
624
640
|
_this.selectShape = function(shapeId, selectedStyle, unselectedStyle) {
|
|
625
641
|
console.log('Selecting shape:', shapeId);
|
|
@@ -2010,7 +2026,7 @@ export class MapOverlayManager {
|
|
|
2010
2026
|
return { perimeter, area, path };
|
|
2011
2027
|
}
|
|
2012
2028
|
|
|
2013
|
-
_this.DrawField_AttachEvents = function (eHandlers) {
|
|
2029
|
+
_this.DrawField_AttachEvents = function (eHandlers, ShapeId, StrokeColor) {
|
|
2014
2030
|
|
|
2015
2031
|
locPolygons.forEach(function (polygon) {
|
|
2016
2032
|
|
|
@@ -2028,10 +2044,25 @@ export class MapOverlayManager {
|
|
|
2028
2044
|
eHandlers["ShapeSelect"](this.id);
|
|
2029
2045
|
});
|
|
2030
2046
|
polygonListeners.push(mclListener);
|
|
2047
|
+
|
|
2048
|
+
if (polygon.id == ShapeId && StrokeColor !== undefined) {
|
|
2049
|
+
polygon.setOptions({ strokeColor: StrokeColor, strokeWeight: 3 });
|
|
2050
|
+
}
|
|
2051
|
+
|
|
2031
2052
|
});
|
|
2032
2053
|
|
|
2033
2054
|
}
|
|
2034
2055
|
|
|
2056
|
+
_this.DrawField_DetachEvents = function (StrokeColor, SelectedShapeId) {
|
|
2057
|
+
polygonListeners_clear();
|
|
2058
|
+
|
|
2059
|
+
locPolygons.forEach(function (polygon) {
|
|
2060
|
+
if(polygon.id == SelectedShapeId) {
|
|
2061
|
+
polygon.setOptions({ strokeColor: StrokeColor });
|
|
2062
|
+
}
|
|
2063
|
+
});
|
|
2064
|
+
}
|
|
2065
|
+
|
|
2035
2066
|
_this.PolygonCustomEdit_Edit = function (ShapeId, isMobile) {
|
|
2036
2067
|
var polygonCE = locPolygons.find(p => p.id == ShapeId);
|
|
2037
2068
|
if (polygonCE) {
|