Browse Source

Dots of items are now attached to the top panel instead of background panel (no need for z-index tricks)

v3_develop
jos 10 years ago
parent
commit
9d45d947e5
3 changed files with 6 additions and 7 deletions
  1. +2
    -2
      lib/timeline/component/ItemSet.js
  2. +3
    -3
      lib/timeline/component/css/item.css
  3. +1
    -2
      lib/timeline/component/css/itemset.css

+ 2
- 2
lib/timeline/component/ItemSet.js View File

@ -364,7 +364,7 @@ ItemSet.prototype.show = function() {
// show axis with dots // show axis with dots
if (!this.dom.axis.parentNode) { if (!this.dom.axis.parentNode) {
this.body.dom.backgroundVertical.appendChild(this.dom.axis);
this.body.dom.top.appendChild(this.dom.axis);
} }
// show labelset containing labels // show labelset containing labels
@ -524,7 +524,7 @@ ItemSet.prototype.redraw = function() {
this.dom.axis.style.top = asSize((orientation == 'top') ? this.dom.axis.style.top = asSize((orientation == 'top') ?
(this.body.domProps.top.height + this.body.domProps.border.top) : (this.body.domProps.top.height + this.body.domProps.border.top) :
(this.body.domProps.top.height + this.body.domProps.centerContainer.height)); (this.body.domProps.top.height + this.body.domProps.centerContainer.height));
this.dom.axis.style.left = this.body.domProps.border.left + 'px';
this.dom.axis.style.left = '0';
// check if this component is resized // check if this component is resized
resized = this._isResized() || resized; resized = this._isResized() || resized;

+ 3
- 3
lib/timeline/component/css/item.css View File

@ -12,7 +12,9 @@
.vis.timeline .item.selected { .vis.timeline .item.selected {
border-color: #FFC200; border-color: #FFC200;
background-color: #FFF785; background-color: #FFF785;
z-index: 999;
/* z-index must be higher than the z-index of custom time bar and current time bar */
z-index: 2;
} }
.vis.timeline .editable .item.selected { .vis.timeline .editable .item.selected {
@ -88,7 +90,6 @@
left: -4px; left: -4px;
cursor: w-resize; cursor: w-resize;
z-index: 10000;
} }
.vis.timeline .item.range .drag-right { .vis.timeline .item.range .drag-right {
@ -99,5 +100,4 @@
right: -4px; right: -4px;
cursor: e-resize; cursor: e-resize;
z-index: 10001; /* a little higher z-index than .drag-left */
} }

+ 1
- 2
lib/timeline/component/css/itemset.css View File

@ -18,8 +18,7 @@
position: absolute; position: absolute;
width: 100%; width: 100%;
height: 0; height: 0;
left: 1px;
z-index: 1;
left: 0;
} }
.vis.timeline .foreground .group { .vis.timeline .foreground .group {

Loading…
Cancel
Save