Skip to content
This repository has been archived by the owner on Jul 29, 2019. It is now read-only.

Create ItemRangeOverflow item type #20

Merged
merged 15 commits into from
Nov 1, 2013
Merged

Create ItemRangeOverflow item type #20

merged 15 commits into from
Nov 1, 2013

Conversation

Gillingham
Copy link
Contributor

Overflow simply extends ItemRange with a new getWidth() function that
determines if the content of the range is wider than the range box
itself.

This did require adding a getWidth() function to the Item object that
always just returns this.width, and adjusting Stack.js to use the new
getWidth() function instead of item.width

This properly fixes and closes #1

Gillingham and others added 15 commits June 11, 2013 17:14
than the width of the text. This prevents range items with longer text
lines from being completely hidden.
Also update the stacking collision check to handle this case so that the
overflowed text is not hidden by another item.
Conflicts:
	src/timeline/component/css/item.css
	vis.js
	vis.min.js
object is already a moment instance. Calling moment(object) will clone
it per tehe moment docs http://momentjs.com/docs/#/parsing/moment-clone/
Overflow simply extends ItemRange with a new getWidth() function that
determines if the content of the range is wider than the range box
itself.

This did require adding a getWidth() function to the Item object that
always just returns this.width, and adjusting Stack.js to use the new
getWidth() function instead of item.width
@josdejong
Copy link
Contributor

Nice work.

Right now only the width is retrieved via getWidth(), other properties are still read immediately from the object. We should replace all these properties with getter functions to have a nice consistent (and more flexible) API again.

josdejong added a commit that referenced this pull request Nov 1, 2013
Create ItemRangeOverflow item type
@josdejong josdejong merged commit 30898d2 into almende:develop Nov 1, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants