[英]onMoveGroup example for vis.js
I have a web app using vis.js and eventhough my method for onMove works the onMoveGroup is not working and I can't find any examples for this online. 我有一个使用vis.js的Web应用程序,尽管我的onMove方法有效,但onMoveGroup无法正常工作,因此我无法在网上找到任何示例。
My code is like this: 我的代码是这样的:
onMove: function (item, callback) {
console.log("onMove", item, callback)
},
onMoveGroup: function (item, callback) {
console.log("onMoveGroup", item, callback)
},
this is how the begining of my timeline options are: 这就是我的时间轴选项的开头:
var timelineOptions = {
height: "100%",
stack: false,
hiddenDates: [],
orientation: 'top',
selectable: true,
zoomable: true,
multiselect: true,
multiselectPerGroup: true,
zoomKey: 'ctrlKey',
//throttleRedraw: 250,
start: moment.preprocessDate().startOf('week').subtract(6, 'days'),
end: moment.preprocessDate().add(userTimelineRange, 'days'),
timeAxis: {scale: 'weekday', step: 1},
format: {
minorLabels: {
'weekday': 'DD [(][K][W]W[)]',
'day': 'DD [(][K][W]W[)]'
}
},
showMajorLabels: true,
groupOrder: function (a, b) {
return a.order - b.order;
},
editable: {
//...
},
See the timeline configuration option groupEditable
, which is false by default. 请参阅时间轴配置选项
groupEditable
,默认情况下为false。 From the options you posted, it appears you're not enabling this feature. 在您发布的选项中,您似乎没有启用此功能。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.