@flourish/info-popup
Advanced tools
Comparing version 3.3.1 to 3.3.2
{ | ||
"name": "@flourish/info-popup", | ||
"version": "3.3.1", | ||
"version": "3.3.2", | ||
"description": "Popup with data insertion", | ||
@@ -5,0 +5,0 @@ "main": "info-popup.js", |
@@ -21,3 +21,3 @@ # Flourish Info Popup | ||
2. Initialize the popup, passing in the state property and optionally containers than determine the position of the popups and panels. E.g.: | ||
2. Initialize the popup, passing in the state property and optionally containers that determine the position of the popups and panels. E.g.: | ||
@@ -29,2 +29,3 @@ ``` js | ||
``` | ||
If you want the panel to fill the whole page (i.e. cover the header & footer), just ignore the `panel_container` and `popup_container` arguments. | ||
@@ -31,0 +32,0 @@ If you want to support "locked" popups properly, for example to position popups programmatically in story slides based on saved state, you should also add a `getLockedPosition` function during initialisation. See below. |
@@ -0,1 +1,4 @@ | ||
# 3.3.2 | ||
* Fix bug where if statements wouldn't work on multiline content | ||
# 3.3.1 | ||
@@ -2,0 +5,0 @@ * Trigger constrainer resize on clickout to fix vertical scroll problem. |
@@ -102,3 +102,3 @@ function getDefaultHTML(instance, d, mode) { | ||
function getParsedContent(content_raw, instance, d) { | ||
var condition_regex = /\{\{#if ((?:[^}]|\}[^}])*)\}\}(.*)\{\{\/if\}\}/g; | ||
var condition_regex = /\{\{#if ((?:[^}]|\}[^}])*)\}\}([\s\S]*)\{\{\/if\}\}/g; | ||
var variable_regex = /\{\{((?:[^}]|\}[^}])*)\}\}/g; | ||
@@ -105,0 +105,0 @@ return content_raw |
@@ -115,3 +115,3 @@ import Popup from "@flourish/popup"; | ||
InfoPopup.prototype.mouseover = function(coords_or_node, d, callback, touch, touch_id) { | ||
var target = this._state.mode == "popup" ? "popup" : "panel"; | ||
var target = this._state.mode == "panel" ? "panel" : "popup"; | ||
if (this._checkIfPopupIsEmpty(d, target, this._state.mode == "both")) return; | ||
@@ -118,0 +118,0 @@ var instance = this; |
Sorry, the diff of this file is too big to display
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
190167
214
0