如何在iOS上双击网站?

问题描述

我正在使用Google Org Chart来创建一个简单的图表,如下所示:

<html>
  <head>
    <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
    <script type="text/javascript">
      google.charts.load('current',{packages:["orgchart"]});
      google.charts.setonLoadCallback(drawChart);

      function drawChart() {
        var data = new google.visualization.DataTable();
        data.addColumn('string','Name');
        data.addColumn('string','Manager');
        data.addColumn('string','ToolTip');

        // For each orgchart Box,provide the name,manager,and tooltip to show.
        data.addRows([
          [{'v':'Mike','f':'Mike<div style="color:red; font-style:italic">President</div>'},'','The President'],[{'v':'Jim','f':'Jim<div style="color:red; font-style:italic">Vice President</div>'},'Mike','VP'],['Alice',''],['Bob','Jim','Bob Sponge'],['Carol','Bob','']
        ]);

        // Create the chart.
        var chart = new google.visualization.OrgChart(document.getElementById('chart_div'));
        // Draw the chart,setting the allowHtml option to true for the tooltips.
        chart.draw(data,{'allowHtml':true,'allowCollapse':true}); /* ALLOW COLLAPSE NOT WORKING IN iOS*/
      }
   </script>
    </head>
  <body>
    <div id="chart_div"></div>
  </body>
</html>

代码(可以通过here进行测试)在除iOS之外的所有操作系统(Windows,Linux,Mac,Android)中都可以正常运行。实际上,如果您在iPhone或iPad上测试此代码,则'allowCollapse':true不起作用。为了折叠组织结构图项目,只需双击该项目本身就足够了,并且它下面的整个树也应该折叠。

您能否提出一种解决此问题的方法,以使折叠功能在iOS中以及在所有其他OS中一样起作用?

谢谢。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)