ArcGIS API:停止旋转“主页”按钮

时间:2018-11-21 08:49:35

标签: arcgis-js-api

请在此处参考此示例:

https://developers.arcgis.com/javascript/latest/sample-code/sandbox/index.html?sample=styling-simple-theme

我添加了“主页”按钮:

require([
  "esri/Map",
  "esri/views/MapView",
  "esri/widgets/Search",
  "esri/widgets/Home",
], function(Map, MapView, Search, Home) {

  var homeBtn = new Home({
    view: view
  }, "homediv");
  homeBtn.startup();

  // Add the home widget to the top left corner of the view
  view.ui.add(homeBtn, "top-left"); 

每当按下“主页”按钮时,我都会看到一个旋转的圆圈。

有没有一种方法可以阻止该“主页”图标变成旋转的圆圈,但仍保留为“主页”图标?

请参阅here,我可以设置“主页”按钮的样式,但无法弄清楚如何停止“主页”按钮的旋转圆圈。

1 个答案:

答案 0 :(得分:2)

稍后解决此问题,并将其发布在此处。希望它将对某人有所帮助:

  .sassy-theme .esri-icon-home {
      animation: none;  
  }

  .sassy-theme .esri-icon-home::before {
     content: "\e62f";
   }
相关问题