From 4f8a125f7ae449886ebfb38ab03c3c9af7c41231 Mon Sep 17 00:00:00 2001 From: Jonathan Narwold Date: Tue, 15 Sep 2020 15:06:44 -0400 Subject: [PATCH] Fix - content was re-clamping on container shrink but not re-expanding on container grow --- src/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/index.js b/src/index.js index cd0541a..9d27de9 100644 --- a/src/index.js +++ b/src/index.js @@ -41,6 +41,10 @@ Dotdotdot.prototype.dotdotdot = function(container) { if (container.length) { throw new Error('Please provide exacly one child to dotdotdot'); } + + if (!this._originalContent) this._originalContent = container.innerHTML + container.innerHTML = this._originalContent + clamp(container, pick(this.props, [ 'animate', 'clamp',