Global

Members

EVENT_NAME_MAP

EVENT_NAME_MAP is used to determine which event fired when a transition/animation ends, based on the style property used to define that event.

(constant) funcThrottle

Author:
  • ilex

简单使用方式: 1.const fn = (data) =>console.log(data); 2.点击事件: handleClick = (e) => funcThrottle(fn, e.target.value);

util

A crude way of determining if an object is a window

Methods

addEventListener(node, eventName, eventListener)

We use the raw {add|remove}EventListener() call because EventListener does not know how to remove event listeners and we really should clean up. Also, these events are not triggered in older browsers so we should be A-OK here.

Parameters:
Name Type Description
node HTMLElement
eventName string
eventListener function

calibrate(coords, cushionopt) → {Object}

Parameters:
Name Type Attributes Description
coords Object
cushion number <optional>

adjustment

Returns:
Type
Object

classNames(args)

set className

Parameters:
Name Type Description
args any

getStyle()

getStyle, get style of element, check for Firefox bug https://bugzilla.mozilla.org/show_bug.cgi?id=548397

rectangle(el, cushionopt) → {Object|boolean}

Since:
  • 1.0.0

Cross-browser element.getBoundingClientRect plus optional cushion. Coords are relative to the top-left corner of the viewport.

Parameters:
Name Type Attributes Description
el Element | Object

element or stack (uses first item)

cushion number <optional>

+/- pixel adjustment amount

Returns:
Type
Object | boolean

removeEventListener(node, eventName, eventListener)

remove event

Parameters:
Name Type Description
node HTMLElement
eventName string
eventListener function

setup()

setup check isBoxSizerOuter do on first getSize() rather than on page load for Firefox bug