ctxMenuForGraphics.addChild(new dijit.MenuItem({ label: "Rotate/Scale", onClick: function() { if (selected.geometry.type !== "point") { editToolbar.activate(esri.toolbars.Edit.ROTATE | esri.toolbars.Edit.SCALE, selected); } else { alert("Not implemented"); } } }));
_extent: Object _graphicsLayer: Object _offsets: Array[1] _shape: Object attributes: undefined geometry: Object spatialReference: Object wkid: 4326 __proto__: Object type: "point" x: -40 y: 35 __proto__: Object infoTemplate: undefined symbol: Object _fill: null _stroke: null align: "middle" color: b.Color font: Object horizontalAlignment: "center" kerning: true rotated: false text: "Editable Text" type: "textsymbol" x: 0 xoffset: 0 y: 0 yoffset: 0
_extent: Object _graphicsLayer: Object _offsets: Array[1] _shape: Object attributes: Object geometry: Object spatialReference: Object wkid: 27700 __proto__: Object type: "point" x: 315910.97257876315 y: 85021.0373395566 __proto__: Object infoTemplate: undefined symbol: Object _inherited: Object align: "middle" angle: 0 color: b.Color font: Object horizontalAlignment: "center" kerning: true rotated: false text: "FAILING" type: "textsymbol" x: 0 xoffset: 0 y: 0 yoffset: 0
if (selected.symbol.declaredClass === "esri.symbol.TextSymbol") { var tool = 0; tool = tool | esri.toolbars.Edit.MOVE; tool = tool | esri.toolbars.Edit.SCALE; tool = tool | esri.toolbars.Edit.ROTATE; tool = tool | esri.toolbars.Edit.EDIT_TEXT; //specify toolbar options var options = { //uniformScaling: false }; editToolbar.activate(tool, selected, options); }
function activateToolbar(graphic) { var tool = 0; tool = tool | esri.toolbars.Edit.MOVE; tool = tool | esri.toolbars.Edit.SCALE; tool = tool | esri.toolbars.Edit.ROTATE; tool = tool | esri.toolbars.Edit.EDIT_TEXT; //specify toolbar options var options = { //uniformScaling: false }; editToolbar.activate(tool, graphic, options); }
ctxMenuForGraphics.addChild(new dijit.MenuItem({ label: "Rotate/Scale", onClick: function () { if (selected.geometry.type !== "Point") { if (selected.symbol.declaredClass === "esri.symbol.TextSymbol") { editToolbar.activate(esri.toolbars.Edit.EDIT_TEXT, selected); } else { editToolbar.activate(esri.toolbars.Edit.ROTATE | esri.toolbars.Edit.SCALE, selected); } } else { alert("Not implemented"); } } }));
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.