- Timestamp:
- 2019-03-01T19:41:57+13:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/web/interfaces/default/js/map-scripts-editor.js
r32833 r32834 409 409 if(JSONString !== "") 410 410 { 411 that.LOAD(JSONString );411 that.LOAD(JSONString, nodeID); 412 412 that.savedOverlays = JSONString; 413 413 } … … 688 688 689 689 // to be called after reading back in stored JSON from archives meta 690 MapEditor.prototype.LOAD = function (json_str ) {690 MapEditor.prototype.LOAD = function (json_str, nodeID) { 691 691 this.mapEditorHistory.historyOverlayPush(); 692 692 693 var map_editor = Object.values(gsmap_store)[0]; 693 694 // This seems to convert the map_store object into an array and forces array index access, instead of convenient property access using nodeID 695 //Object.values(gsmap_store)[0]; // Always gets top level section's map-editor, not what we want. 696 697 // Get the map editor for the nodeID, as we're asked to load that editor 698 var map_editor = gsmap_store["map-"+nodeID]; 694 699 695 700 var new_overlays = ShapesUtil.JSONToOverlays(json_str);
Note:
See TracChangeset
for help on using the changeset viewer.