Browse Source

Implemented option `minHeight`, similar to option `maxHeight`. (See #132)

css_transitions
jos 10 years ago
parent
commit
8ffacecd38
3 changed files with 14 additions and 4 deletions
  1. +3
    -0
      HISTORY.md
  2. +10
    -4
      docs/timeline.html
  3. +1
    -0
      src/timeline/component/RootPanel.js

+ 3
- 0
HISTORY.md View File

@ -1,10 +1,12 @@
# vis.js history # vis.js history
http://visjs.org http://visjs.org
## not yet released, version 1.0.2 ## not yet released, version 1.0.2
### Timeline ### Timeline
- Implemented option `minHeight`, similar to option `maxHeight`.
- Some tweaks in snapping dragged items to nice dates. - Some tweaks in snapping dragged items to nice dates.
- Made the instance of moment.js packaged with vis.js accessibly via `vis.moment`. - Made the instance of moment.js packaged with vis.js accessibly via `vis.moment`.
- Fixed a bug in replacing the DataSet of groups via `Timeline.setGroups(groups)`. - Fixed a bug in replacing the DataSet of groups via `Timeline.setGroups(groups)`.
@ -14,6 +16,7 @@ http://visjs.org
- added zoomable and moveable options. - added zoomable and moveable options.
- changes setOptions to avoid resetting view. - changes setOptions to avoid resetting view.
## 2014-05-09, version 1.0.1 ## 2014-05-09, version 1.0.1
### Timeline ### Timeline

+ 10
- 4
docs/timeline.html View File

@ -402,7 +402,7 @@ var options = {
<tr> <tr>
<td>height</td> <td>height</td>
<td>String</td>
<td>Number | String</td>
<td>none</td> <td>none</td>
<td>The height of the timeline in pixels or as a percentage. <td>The height of the timeline in pixels or as a percentage.
When height is undefined or null, the height of the timeline is automatically When height is undefined or null, the height of the timeline is automatically
@ -438,10 +438,9 @@ var options = {
<tr> <tr>
<td>maxHeight</td> <td>maxHeight</td>
<td>Number</td>
<td>Number | String</td>
<td>none</td> <td>none</td>
<td>Specifies a maximum height for the Timeline in pixels.
</td>
<td>Specifies the maximum height for the Timeline. Can be a number in pixels or a string like "300px".</td>
</tr> </tr>
<tr> <tr>
@ -453,6 +452,13 @@ var options = {
</td> </td>
</tr> </tr>
<tr>
<td>minHeight</td>
<td>Number | String</td>
<td>none</td>
<td>Specifies the minimum height for the Timeline. Can be a number in pixels or a string like "300px".</td>
</tr>
<tr> <tr>
<td>onAdd</td> <td>onAdd</td>
<td>Function</td> <td>Function</td>

+ 1
- 0
src/timeline/component/RootPanel.js View File

@ -101,6 +101,7 @@ RootPanel.prototype.repaint = function repaint() {
// update frame size // update frame size
this.frame.style.maxHeight = util.option.asSize(this.options.maxHeight, ''); this.frame.style.maxHeight = util.option.asSize(this.options.maxHeight, '');
this.frame.style.minHeight = util.option.asSize(this.options.minHeight, '');
this._updateSize(); this._updateSize();
// if the root panel or any of its childs is resized, repaint again, // if the root panel or any of its childs is resized, repaint again,

Loading…
Cancel
Save