【问题标题】:draw a shape in sencha touch在煎茶触摸中绘制形状
【发布时间】:2011-08-26 22:24:36
【问题描述】:

我正在寻找,但我找不到在煎茶触摸中绘制形状(圆形、方形)的方法,只是为了在平板电脑中拖动该形状。如果有人知道如何做到这一点,将不胜感激。

【问题讨论】:

    标签: sencha-touch extjs sencha-charts sencha-touch-theming


    【解决方案1】:

    您需要使用 ext.draw,它是 Touch 的 Sencha Touch Charts 附加组件的一部分。

    【讨论】:

      【解决方案2】:

      假设您已经在 index.html 中包含了 sencha-touch.js 和 touch-charts.js 文件...

      来自Ext.draw.Component 上的 Sencha 文档:

      var drawComponent = Ext.create('Ext.draw.Component', {
          viewBox: false,
          items: [{
              type: 'circle',
              fill: '#79BB3F',
              radius: 100,
              x: 100,
              y: 100
          }]
      });
      
      Ext.create('Ext.Window', {
          width: 215,
          height: 235,
          layout: 'fit',
          items: [drawComponent]
      }).show();
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2011-12-25
        • 2012-11-04
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多