0

我想向事件数据源添加几个自定义字段,例如:

{"events":
   [
      {"isDuration": "true",
       "description": "my description
       "color": "#ffcc00",
       "image": "/images/my-img.jpg",
       "link": "http://www.google.co.uk",
       "icon": "/images/red-ico.png",
       "end": null,
       "title": "my title",
       "start": "2012,09,30",
       "textColor": "#777",
       "customField_1": "abc"
       "customField_2" : "def"}
   ]
}

然后在 showBubble 事件中检索customField_1customField_2,如下所示:

Timeline.OriginalEventPainter.prototype._showBubble = function(x, y, evt) {

      var cust1 = evt.getCustom1();
      var cust2 = evt.getCustom2();
}

是否可以添加这些 get 方法,我将如何处理?

4

1 回答 1

0

这是答案:https ://groups.google.com/forum/#!topic/simile-widgets/om3EtWzGacQ

于 2012-09-18T14:39:46.307 回答