@builder.io/sdk
Advanced tools
Comparing version 0.0.94 to 0.0.95
@@ -19,3 +19,3 @@ export declare class EventCapturer { | ||
private formatMessage(event); | ||
private findParent(target, callback); | ||
private findParent(target, callback, checkElement?); | ||
private findPageBlockParent(target); | ||
@@ -22,0 +22,0 @@ private findBuilderParent(target); |
@@ -441,7 +441,8 @@ 'use strict'; | ||
}; | ||
EventCapturer.prototype.findParent = function (target, callback) { | ||
EventCapturer.prototype.findParent = function (target, callback, checkElement) { | ||
if (checkElement === void 0) { checkElement = true; } | ||
if (!(target instanceof HTMLElement)) { | ||
return null; | ||
} | ||
var parent = target; | ||
var parent = checkElement ? target : target.parentElement; | ||
do { | ||
@@ -465,7 +466,7 @@ if (!parent) { | ||
var currentDisplay = parent.style.display; | ||
parent.style.display = 'none'; | ||
parent.style.display = 'inline'; | ||
var parentHeight = getComputedStyle(parent).height || ''; | ||
parent.style.display = currentDisplay; | ||
return parentHeight.includes('px'); | ||
})); | ||
}, false)); | ||
}); | ||
@@ -472,0 +473,0 @@ }; |
@@ -435,7 +435,8 @@ import uniqueSelector from 'unique-selector'; | ||
}; | ||
EventCapturer.prototype.findParent = function (target, callback) { | ||
EventCapturer.prototype.findParent = function (target, callback, checkElement) { | ||
if (checkElement === void 0) { checkElement = true; } | ||
if (!(target instanceof HTMLElement)) { | ||
return null; | ||
} | ||
var parent = target; | ||
var parent = checkElement ? target : target.parentElement; | ||
do { | ||
@@ -459,7 +460,7 @@ if (!parent) { | ||
var currentDisplay = parent.style.display; | ||
parent.style.display = 'none'; | ||
parent.style.display = 'inline'; | ||
var parentHeight = getComputedStyle(parent).height || ''; | ||
parent.style.display = currentDisplay; | ||
return parentHeight.includes('px'); | ||
})); | ||
}, false)); | ||
}); | ||
@@ -466,0 +467,0 @@ }; |
{ | ||
"name": "@builder.io/sdk", | ||
"version": "0.0.94", | ||
"version": "0.0.95", | ||
"browser": "./dist/index.umd.min.js", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.cjs.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
1034456
15837