Browse Source

Moved function getLabelsWidth

css_transitions
jos 10 years ago
parent
commit
8f352edb53
2 changed files with 13 additions and 1 deletions
  1. +0
    -1
      src/timeline/Timeline.js
  2. +13
    -0
      src/timeline/component/ItemSet.js

+ 0
- 1
src/timeline/Timeline.js View File

@ -436,7 +436,6 @@ Timeline.prototype.setItems = function(items) {
*/
Timeline.prototype.setGroups = function(groupSet) {
this.groupsData = groupSet;
this.itemSet.setGroups(groupSet);
};

+ 13
- 0
src/timeline/component/ItemSet.js View File

@ -19,6 +19,11 @@ function ItemSet(backgroundPanel, axisPanel, options) {
this.axisPanel = axisPanel;
this.itemOptions = Object.create(this.options);
this.dom = {};
this.props = {
labels: {
width: 0
}
};
this.hammer = null;
var me = this;
@ -698,6 +703,14 @@ ItemSet.prototype._constructByEndArray = function _constructByEndArray(array) {
return endArray;
};
/**
* Get the width of the group labels
* @return {Number} width
*/
ItemSet.prototype.getLabelsWidth = function getLabelsWidth() {
return this.props.labels.width;
};
/**
* Start dragging the selected events
* @param {Event} event

Loading…
Cancel
Save