app/assets/build/coco/app.js in coveragebook_components-0.8.0.beta.1 vs app/assets/build/coco/app.js in coveragebook_components-0.8.0.beta.2
- old
+ new
@@ -14036,11 +14036,11 @@
// ../../../package.json
var package_default = {
name: "coveragebook-components",
type: "module",
- version: "0.8.0-beta.1",
+ version: "0.8.0-beta.2",
main: "index.js",
repository: "git@github.com:coveragebook/coco.git",
author: "Mark Perkins <mark@coveragebook.com>",
license: "NO LICENSE",
browserslist: [
@@ -24577,10 +24577,16 @@
return {
alert: null,
dismissed: false,
forceMultiLine: false,
dismissDuration: 300,
+ init() {
+ this.checkSingleLineWrap = Alpine.throttle(
+ this.checkSingleLineWrap.bind(this),
+ 200
+ );
+ },
dismiss() {
if (this.$options.dismissable) {
this.$dispatch("alert:dismiss", {
alert: this,
duration: this.dismissDuration
@@ -24593,12 +24599,14 @@
this.$nextTick(() => this.$dispatch("alert:removed", { alert: this }));
this.$root.remove();
},
checkSingleLineWrap({ height }) {
this.forceMultiLine = false;
- this.$nextTick(() => {
- this.forceMultiLine = height > 24 && this.$options.singleLine;
- });
+ if (height > 24 && this.$options.singleLine) {
+ this.$nextTick(() => {
+ this.forceMultiLine = true;
+ });
+ }
},
root: {
"x-options": '["dismissable", "singleLine"]',
":class": "{'force-multi-line': forceMultiLine}"
}