Ignore:
Timestamp:
2019-03-04T16:30:56+13:00 (5 years ago)
Author:
ak19
Message:
  1. Zeddy introduces suppressUndo and cleaned up lots of CloneShape sectionst that were commented out. 2. Zeddy and Dr Bainbridge solved the issue whereby shapes loaded from archives_metadata were not selectable and needed a deleteAllShapes followed by Undo to make them selectable. These steps are no longer needed now, as it's solved more efficiently.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/default/js/map-scripts-shapes-util.js

    r32832 r32850  
    6464       
    6565        clone_poly = new google.maps.Polyline({
     66            suppressUndo: true,
    6667            geodesic:      geodesic,
    6768            strokeColor:   strokeColor,
     
    8081   
    8182        clone_poly = new google.maps.Polygon({
     83            suppressUndo: true,
    8284            geodesic:      geodesic,
    8385            strokeColor:   strokeColor,
     
    186188   
    187189    var clone_rect = new google.maps.Rectangle({
    188             strokeColor: strokeColor,
    189             strokeOpacity: strokeOpacity,
    190             strokeWeight: strokeWeight,
    191             fillColor: fillColor,
    192             fillOpacity: fillOpacity,
    193             bounds: bounds,
    194             draggable: true,
    195             editable: false,
    196             type: type
    197         });
     190        suppressUndo: true,
     191        strokeColor: strokeColor,
     192        strokeOpacity: strokeOpacity,
     193        strokeWeight: strokeWeight,
     194        fillColor: fillColor,
     195        fillOpacity: fillOpacity,
     196        bounds: bounds,
     197        draggable: true,
     198        editable: false,
     199        type: type
     200    });
    198201    return clone_rect;
    199202}
     
    267270   
    268271    var clone_circ = new google.maps.Circle({
    269             strokeColor: strokeColor,
    270             strokeOpacity: strokeOpacity,
    271             strokeWeight: strokeWeight,
    272             fillColor: fillColor,
    273             fillOpacity: fillOpacity,
    274             center: center,
    275             radius: radius,
    276             draggable: true,
    277             editable: false,
    278             type: type
    279         });
     272        suppressUndo: true,
     273        strokeColor: strokeColor,
     274        strokeOpacity: strokeOpacity,
     275        strokeWeight: strokeWeight,
     276        fillColor: fillColor,
     277        fillOpacity: fillOpacity,
     278        center: center,
     279        radius: radius,
     280        draggable: true,
     281        editable: false,
     282        type: type
     283    });
    280284    return clone_circ;
    281285}
     
    320324   
    321325    var clone_marker = new google.maps.Marker({
    322             position: position,
    323             clickable: true,
    324             draggable: true,
    325             editable: true,
    326             type: google.maps.drawing.OverlayType.MARKER
    327         })
     326        suppressUndo: true,
     327        position: position,
     328        clickable: true,
     329        draggable: true,
     330        editable: true,
     331        type: google.maps.drawing.OverlayType.MARKER
     332    })
    328333    return clone_marker;
    329334}
Note: See TracChangeset for help on using the changeset viewer.