-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: Works when orientation of item is set to top.
- Loading branch information
Showing
3 changed files
with
10 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,8 @@ | |
* | ||
* Class to easily draw lines to connect items in the vis Timeline module. | ||
* | ||
* @version 4.1.0 | ||
* @date 2022-08-01 | ||
* @version 4.1.1 | ||
* @date 2023-11-07 | ||
* | ||
* @copyright (c) Javi Domenech ([email protected]) | ||
* | ||
|
@@ -224,7 +224,12 @@ export default class Arrow { | |
//Función que recibe in Item y devuelve la posición en pantalla del item. | ||
_getItemPos (item) { | ||
let left_x = item.left; | ||
let top_y = item.parent.top + item.parent.height - item.top - item.height; | ||
let top_y; | ||
if (this._timeline.options.orientation.item == "top") { | ||
top_y = item.parent.top + item.top; | ||
} else { | ||
top_y = item.parent.top + item.parent.height - item.top - item.height; | ||
} | ||
return { | ||
left: left_x, | ||
top: top_y, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters