Skip to content

Commit

Permalink
the user may now specify how to handle toolbar overflow (default: vis…
Browse files Browse the repository at this point in the history
…ible ... old default was hidden)
  • Loading branch information
dound committed Dec 7, 2008
1 parent 81d21de commit 7a1e5b4
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion jtoolbar.js
Expand Up @@ -473,6 +473,9 @@ var JTB = function() {
/* whether to clamp a floating toolbar to its container's size */
this.clamp_size_on_float = false;

/* how to deal with toolbar overflow */
this.overflow_style = 'visible';

/* position at the beginning of a drag */
this.dragStartX = 0;
this.dragStartY = 0;
Expand Down Expand Up @@ -1022,6 +1025,18 @@ var JTB = function() {
return this;
};

/** get how the toolbar deals with overflow */
JTB.Toolbar.prototype.getOverflowStyle = function() {
return this.overflow_style;
};

/** set how the toolbar deals with overflow */
JTB.Toolbar.prototype.setOverflowStyle = function(o) {
this.overflow_style = o;
this.refreshGfx();
return this;
};

/** returns true if an animation is going on */
JTB.Toolbar.prototype.isAnimating = function() {
return (this.anim_start != -1);
Expand Down Expand Up @@ -1144,7 +1159,7 @@ var JTB = function() {
}
else {
/* always crop overflow: some users may want scroll here */
this.e_tb.style.overflow = 'hidden';
this.e_tb.style.overflow = this.overflow_style;
}

/* show/hide toolbar based on its state if there is no anim */
Expand Down

0 comments on commit 7a1e5b4

Please sign in to comment.