Added getter and setter for maxWidth and maxHeight for button groups.
This commit is contained in:
Vendored
-16
@@ -2480,8 +2480,6 @@
|
||||
onMouseWheel(event) {
|
||||
if (this.capture(event) && this.target.onMouseWheel) {
|
||||
this.target.onMouseWheel(event);
|
||||
} else {
|
||||
//console.warn('Target has no onMouseWheel callback')
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2685,8 +2683,6 @@
|
||||
}
|
||||
if (this.target.onMouseWheel) {
|
||||
this.target.onMouseWheel(event);
|
||||
} else {
|
||||
//console.warn('Target has no onMouseWheel callback', this.target)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7609,8 +7605,6 @@
|
||||
|
||||
/** To avoid problems with relative URL paths, we use inline data URI to load svg icons. */
|
||||
|
||||
const enableNearestNeighborTaps = false;
|
||||
|
||||
/**
|
||||
* A class that collects static methods to maintain the states and parts of
|
||||
* EyeVisit like cards.
|
||||
@@ -9015,16 +9009,6 @@
|
||||
if (this.dynamicHeight) {
|
||||
article.appendChild(iconClone);
|
||||
}
|
||||
|
||||
if (enableNearestNeighborTaps) {
|
||||
//look for nearby popups on tap
|
||||
InteractionMapper.on('tap', indexbox, () => {
|
||||
console.log('Tap handler called', editable);
|
||||
if (!editable) {
|
||||
this.findNearbyPopups(event, card);
|
||||
}
|
||||
});
|
||||
}
|
||||
// Use the 'tap' event for closing.
|
||||
// Otherwise the subcard cannot be closed,
|
||||
// when another subcard is touched.
|
||||
|
||||
Vendored
+28
-4
@@ -3298,6 +3298,34 @@
|
||||
this.buttons.forEach(it => (it.disabled = value));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets or sets the maximum width of the button group for stacking. Usefull when you want to resize the available space.
|
||||
*
|
||||
* @member {number}
|
||||
*/
|
||||
get maxWidth() {
|
||||
return this.opts.maxWidth
|
||||
}
|
||||
|
||||
set maxWidth(value) {
|
||||
this.opts.maxWidth = value;
|
||||
this.layout();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets or sets the maximum height of the button group for stacking. Usefull when you want to resize the available space.
|
||||
*
|
||||
* @member {number}
|
||||
*/
|
||||
get maxHeight() {
|
||||
return this.opts.maxHeight
|
||||
}
|
||||
|
||||
set maxHeight(value) {
|
||||
this.opts.maxHeight = value;
|
||||
this.layout();
|
||||
}
|
||||
|
||||
/**
|
||||
* Searches all buttons of the button group and returns the maximum width of one button.
|
||||
*
|
||||
@@ -6035,8 +6063,6 @@
|
||||
onMouseWheel(event) {
|
||||
if (this.capture(event) && this.target.onMouseWheel) {
|
||||
this.target.onMouseWheel(event);
|
||||
} else {
|
||||
//console.warn('Target has no onMouseWheel callback')
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6240,8 +6266,6 @@
|
||||
}
|
||||
if (this.target.onMouseWheel) {
|
||||
this.target.onMouseWheel(event);
|
||||
} else {
|
||||
//console.warn('Target has no onMouseWheel callback', this.target)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user