Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@glomex/glomex-dialog

Package Overview
Dependencies
Maintainers
10
Versions
95
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@glomex/glomex-dialog - npm Package Compare versions

Comparing version 2.0.6 to 2.1.0

25

glomex-dialog.js

@@ -11,2 +11,3 @@ import { RotataToFullscreen } from './rotate-to-fullscreen.js';

const PHONE_MAX_WIDTH = 480;
const STICKY_TOP_SELECTOR_THRESHOLD = 200;

@@ -47,6 +48,8 @@ let allowRotateToFullscreen = false;

const dockTarget = element.getAttribute('dock-target');
let dockTargetElement;
let dockTargetElements;
if (dockTarget) {
dockTargetElement = document.querySelector(dockTarget);
if (!dockTargetElement) return null;
dockTargetElements = document.querySelectorAll(dockTarget);
if (dockTargetElements.length === 0) return null;
// pick the innermost node (querySelectorAll sorts by order in DOM)
const dockTargetElement = dockTargetElements[dockTargetElements.length - 1];
const intersection = getViewportIntersection(dockTargetElement);

@@ -847,2 +850,18 @@ if (intersection && intersection.width > 0 && intersection.height > 0) {

];
// adjust the ".dock-sticky-target" top value based on selector
if (dockMode === 'sticky') {
const alternativeDockTarget = getAlternativeDockTarget(this);
if (alternativeDockTarget) {
const { height } = getViewportIntersection(alternativeDockTarget);
// in case we attach to navigation bars that can be expanded
// we ignore to adjust sticky position below a certain threshold
// based on given external selector
if (height < STICKY_TOP_SELECTOR_THRESHOLD) {
// add 5px to have some distance from the top
const adjustedHeight = height + 5;
dockStickyTarget.style.top = `${adjustedHeight || 0}px`;
}
}
}
const moveTo = dockMode === 'sticky'

@@ -849,0 +868,0 @@ ? getDockStickyTarget(this)

2

package.json
{
"name": "@glomex/glomex-dialog",
"version": "2.0.6",
"version": "2.1.0",
"description": "A dialog web component that allows docking a video player or putting it in a lightbox",

@@ -5,0 +5,0 @@ "type": "module",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc