Dojo has a lot of built in animations such as fade out. dojo.fadeOut({ node:"Your Element", duration:700, onEnd: function(){ dojo.style("Your Element", "display", "none"); } }).play();Some examples can be found here http://dojotoolkit.org/reference-guide/dojo/fadeOut.html
dojo.fadeOut({ node:"Your Element", duration:700, onEnd: function(){ dojo.style("Your Element", "display", "none"); } }).play();
// serialize the extent to JSON, create a new extent to later pass to the map var featExt = new esri.geometry.Extent(ext.toJson()); // listen to onExtentChange and then show a // graphic for the selected feature's extent this.extHandle = dojo.connect(this.map, 'onExtentChange', this, function() { var outline = new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([0, 173, 230, 1]), 3), symbol = new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID, outline, new dojo.Color([0, 0, 128, 0])), extGraphic = new esri.Graphic(featExt, symbol); this.map.graphics.add(extGraphic); // fade out the graphic and remove it var fo = dojo.fadeOut({ 'node': extGraphic.getDojoShape().getNode(), 'duration': 1500, }); // remove the graphic and clean up the event listeners // after the animation plays this.foHandle = dojo.connect(fo, 'onEnd', this, function() { this.map.graphics.remove(extGraphic); dojo.disconnect(this.extHandle); dojo.disconnect(this.foHandle); }); fo.play(); }); // set the new extent this.map.setExtent(featExt, true);
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.