code
stringlengths
24
2.07M
docstring
stringlengths
25
85.3k
func_name
stringlengths
1
92
language
stringclasses
1 value
repo
stringlengths
5
64
path
stringlengths
4
172
url
stringlengths
44
218
license
stringclasses
7 values
function getAll( context, tag ) { // Support: IE <=9 - 11 only // Use typeof to avoid zero-argument method invocation on host objects (trac-15151) var ret; if ( typeof context.getElementsByTagName !== "undefined" ) { ret = context.getElementsByTagName( tag || "*" ); } else if ( typeof context.querySelectorAll...
A low-level selection function that works with jQuery's compiled selector functions @param {String|Function} selector A selector or a pre-compiled selector function built with jQuery selector compile @param {Element} context @param {Array} [results] @param {Array} [seed] A set of elements to match against
getAll
javascript
pallets-eco/flask-debugtoolbar
src/flask_debugtoolbar/static/js/jquery.js
https://github.com/pallets-eco/flask-debugtoolbar/blob/master/src/flask_debugtoolbar/static/js/jquery.js
BSD-3-Clause
function setGlobalEval( elems, refElements ) { var i = 0, l = elems.length; for ( ; i < l; i++ ) { dataPriv.set( elems[ i ], "globalEval", !refElements || dataPriv.get( refElements[ i ], "globalEval" ) ); } }
A low-level selection function that works with jQuery's compiled selector functions @param {String|Function} selector A selector or a pre-compiled selector function built with jQuery selector compile @param {Element} context @param {Array} [results] @param {Array} [seed] A set of elements to match against
setGlobalEval
javascript
pallets-eco/flask-debugtoolbar
src/flask_debugtoolbar/static/js/jquery.js
https://github.com/pallets-eco/flask-debugtoolbar/blob/master/src/flask_debugtoolbar/static/js/jquery.js
BSD-3-Clause
function buildFragment( elems, context, scripts, selection, ignored ) { var elem, tmp, tag, wrap, attached, j, fragment = context.createDocumentFragment(), nodes = [], i = 0, l = elems.length; for ( ; i < l; i++ ) { elem = elems[ i ]; if ( elem || elem === 0 ) { // Add nodes directly if ( toType(...
A low-level selection function that works with jQuery's compiled selector functions @param {String|Function} selector A selector or a pre-compiled selector function built with jQuery selector compile @param {Element} context @param {Array} [results] @param {Array} [seed] A set of elements to match against
buildFragment
javascript
pallets-eco/flask-debugtoolbar
src/flask_debugtoolbar/static/js/jquery.js
https://github.com/pallets-eco/flask-debugtoolbar/blob/master/src/flask_debugtoolbar/static/js/jquery.js
BSD-3-Clause
function returnTrue() { return true; }
A low-level selection function that works with jQuery's compiled selector functions @param {String|Function} selector A selector or a pre-compiled selector function built with jQuery selector compile @param {Element} context @param {Array} [results] @param {Array} [seed] A set of elements to match against
returnTrue
javascript
pallets-eco/flask-debugtoolbar
src/flask_debugtoolbar/static/js/jquery.js
https://github.com/pallets-eco/flask-debugtoolbar/blob/master/src/flask_debugtoolbar/static/js/jquery.js
BSD-3-Clause
function returnFalse() { return false; }
A low-level selection function that works with jQuery's compiled selector functions @param {String|Function} selector A selector or a pre-compiled selector function built with jQuery selector compile @param {Element} context @param {Array} [results] @param {Array} [seed] A set of elements to match against
returnFalse
javascript
pallets-eco/flask-debugtoolbar
src/flask_debugtoolbar/static/js/jquery.js
https://github.com/pallets-eco/flask-debugtoolbar/blob/master/src/flask_debugtoolbar/static/js/jquery.js
BSD-3-Clause
function on( elem, types, selector, data, fn, one ) { var origFn, type; // Types can be a map of types/handlers if ( typeof types === "object" ) { // ( types-Object, selector, data ) if ( typeof selector !== "string" ) { // ( types-Object, data ) data = data || selector; selector = undefined; } f...
A low-level selection function that works with jQuery's compiled selector functions @param {String|Function} selector A selector or a pre-compiled selector function built with jQuery selector compile @param {Element} context @param {Array} [results] @param {Array} [seed] A set of elements to match against
on
javascript
pallets-eco/flask-debugtoolbar
src/flask_debugtoolbar/static/js/jquery.js
https://github.com/pallets-eco/flask-debugtoolbar/blob/master/src/flask_debugtoolbar/static/js/jquery.js
BSD-3-Clause
function leverageNative( el, type, isSetup ) { // Missing `isSetup` indicates a trigger call, which must force setup through jQuery.event.add if ( !isSetup ) { if ( dataPriv.get( el, type ) === undefined ) { jQuery.event.add( el, type, returnTrue ); } return; } // Register the controller as a special uni...
A low-level selection function that works with jQuery's compiled selector functions @param {String|Function} selector A selector or a pre-compiled selector function built with jQuery selector compile @param {Element} context @param {Array} [results] @param {Array} [seed] A set of elements to match against
leverageNative
javascript
pallets-eco/flask-debugtoolbar
src/flask_debugtoolbar/static/js/jquery.js
https://github.com/pallets-eco/flask-debugtoolbar/blob/master/src/flask_debugtoolbar/static/js/jquery.js
BSD-3-Clause
function focusMappedHandler( nativeEvent ) { if ( document.documentMode ) { // Support: IE 11+ // Attach a single focusin/focusout handler on the document while someone wants // focus/blur. This is because the former are synchronous in IE while the latter // are async. In other browsers, all those handle...
A low-level selection function that works with jQuery's compiled selector functions @param {String|Function} selector A selector or a pre-compiled selector function built with jQuery selector compile @param {Element} context @param {Array} [results] @param {Array} [seed] A set of elements to match against
focusMappedHandler
javascript
pallets-eco/flask-debugtoolbar
src/flask_debugtoolbar/static/js/jquery.js
https://github.com/pallets-eco/flask-debugtoolbar/blob/master/src/flask_debugtoolbar/static/js/jquery.js
BSD-3-Clause
function manipulationTarget( elem, content ) { if ( nodeName( elem, "table" ) && nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) { return jQuery( elem ).children( "tbody" )[ 0 ] || elem; } return elem; }
A low-level selection function that works with jQuery's compiled selector functions @param {String|Function} selector A selector or a pre-compiled selector function built with jQuery selector compile @param {Element} context @param {Array} [results] @param {Array} [seed] A set of elements to match against
manipulationTarget
javascript
pallets-eco/flask-debugtoolbar
src/flask_debugtoolbar/static/js/jquery.js
https://github.com/pallets-eco/flask-debugtoolbar/blob/master/src/flask_debugtoolbar/static/js/jquery.js
BSD-3-Clause
function disableScript( elem ) { elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type; return elem; }
A low-level selection function that works with jQuery's compiled selector functions @param {String|Function} selector A selector or a pre-compiled selector function built with jQuery selector compile @param {Element} context @param {Array} [results] @param {Array} [seed] A set of elements to match against
disableScript
javascript
pallets-eco/flask-debugtoolbar
src/flask_debugtoolbar/static/js/jquery.js
https://github.com/pallets-eco/flask-debugtoolbar/blob/master/src/flask_debugtoolbar/static/js/jquery.js
BSD-3-Clause
function restoreScript( elem ) { if ( ( elem.type || "" ).slice( 0, 5 ) === "true/" ) { elem.type = elem.type.slice( 5 ); } else { elem.removeAttribute( "type" ); } return elem; }
A low-level selection function that works with jQuery's compiled selector functions @param {String|Function} selector A selector or a pre-compiled selector function built with jQuery selector compile @param {Element} context @param {Array} [results] @param {Array} [seed] A set of elements to match against
restoreScript
javascript
pallets-eco/flask-debugtoolbar
src/flask_debugtoolbar/static/js/jquery.js
https://github.com/pallets-eco/flask-debugtoolbar/blob/master/src/flask_debugtoolbar/static/js/jquery.js
BSD-3-Clause
function cloneCopyEvent( src, dest ) { var i, l, type, pdataOld, udataOld, udataCur, events; if ( dest.nodeType !== 1 ) { return; } // 1. Copy private data: events, handlers, etc. if ( dataPriv.hasData( src ) ) { pdataOld = dataPriv.get( src ); events = pdataOld.events; if ( events ) { dataPriv.remov...
A low-level selection function that works with jQuery's compiled selector functions @param {String|Function} selector A selector or a pre-compiled selector function built with jQuery selector compile @param {Element} context @param {Array} [results] @param {Array} [seed] A set of elements to match against
cloneCopyEvent
javascript
pallets-eco/flask-debugtoolbar
src/flask_debugtoolbar/static/js/jquery.js
https://github.com/pallets-eco/flask-debugtoolbar/blob/master/src/flask_debugtoolbar/static/js/jquery.js
BSD-3-Clause
function fixInput( src, dest ) { var nodeName = dest.nodeName.toLowerCase(); // Fails to persist the checked state of a cloned checkbox or radio button. if ( nodeName === "input" && rcheckableType.test( src.type ) ) { dest.checked = src.checked; // Fails to return the selected option to the default selected sta...
A low-level selection function that works with jQuery's compiled selector functions @param {String|Function} selector A selector or a pre-compiled selector function built with jQuery selector compile @param {Element} context @param {Array} [results] @param {Array} [seed] A set of elements to match against
fixInput
javascript
pallets-eco/flask-debugtoolbar
src/flask_debugtoolbar/static/js/jquery.js
https://github.com/pallets-eco/flask-debugtoolbar/blob/master/src/flask_debugtoolbar/static/js/jquery.js
BSD-3-Clause
function domManip( collection, args, callback, ignored ) { // Flatten any nested arrays args = flat( args ); var fragment, first, scripts, hasScripts, node, doc, i = 0, l = collection.length, iNoClone = l - 1, value = args[ 0 ], valueIsFunction = isFunction( value ); // We can't cloneNode fragments tha...
A low-level selection function that works with jQuery's compiled selector functions @param {String|Function} selector A selector or a pre-compiled selector function built with jQuery selector compile @param {Element} context @param {Array} [results] @param {Array} [seed] A set of elements to match against
domManip
javascript
pallets-eco/flask-debugtoolbar
src/flask_debugtoolbar/static/js/jquery.js
https://github.com/pallets-eco/flask-debugtoolbar/blob/master/src/flask_debugtoolbar/static/js/jquery.js
BSD-3-Clause
function remove( elem, selector, keepData ) { var node, nodes = selector ? jQuery.filter( selector, elem ) : elem, i = 0; for ( ; ( node = nodes[ i ] ) != null; i++ ) { if ( !keepData && node.nodeType === 1 ) { jQuery.cleanData( getAll( node ) ); } if ( node.parentNode ) { if ( keepData && isAttache...
A low-level selection function that works with jQuery's compiled selector functions @param {String|Function} selector A selector or a pre-compiled selector function built with jQuery selector compile @param {Element} context @param {Array} [results] @param {Array} [seed] A set of elements to match against
remove
javascript
pallets-eco/flask-debugtoolbar
src/flask_debugtoolbar/static/js/jquery.js
https://github.com/pallets-eco/flask-debugtoolbar/blob/master/src/flask_debugtoolbar/static/js/jquery.js
BSD-3-Clause
getStyles = function( elem ) { // Support: IE <=11 only, Firefox <=30 (trac-15098, trac-14150) // IE throws on elements created in popups // FF meanwhile throws on frame elements through "defaultView.getComputedStyle" var view = elem.ownerDocument.defaultView; if ( !view || !view.opener ) { view = window...
A low-level selection function that works with jQuery's compiled selector functions @param {String|Function} selector A selector or a pre-compiled selector function built with jQuery selector compile @param {Element} context @param {Array} [results] @param {Array} [seed] A set of elements to match against
getStyles
javascript
pallets-eco/flask-debugtoolbar
src/flask_debugtoolbar/static/js/jquery.js
https://github.com/pallets-eco/flask-debugtoolbar/blob/master/src/flask_debugtoolbar/static/js/jquery.js
BSD-3-Clause
swap = function( elem, options, callback ) { var ret, name, old = {}; // Remember the old values, and insert the new ones for ( name in options ) { old[ name ] = elem.style[ name ]; elem.style[ name ] = options[ name ]; } ret = callback.call( elem ); // Revert the old values for ( name in options ) { ...
A low-level selection function that works with jQuery's compiled selector functions @param {String|Function} selector A selector or a pre-compiled selector function built with jQuery selector compile @param {Element} context @param {Array} [results] @param {Array} [seed] A set of elements to match against
swap
javascript
pallets-eco/flask-debugtoolbar
src/flask_debugtoolbar/static/js/jquery.js
https://github.com/pallets-eco/flask-debugtoolbar/blob/master/src/flask_debugtoolbar/static/js/jquery.js
BSD-3-Clause
function computeStyleTests() { // This is a singleton, we need to execute it only once if ( !div ) { return; } container.style.cssText = "position:absolute;left:-11111px;width:60px;" + "margin-top:1px;padding:0;border:0"; div.style.cssText = "position:relative;display:block;box-sizing:border-box;ov...
A low-level selection function that works with jQuery's compiled selector functions @param {String|Function} selector A selector or a pre-compiled selector function built with jQuery selector compile @param {Element} context @param {Array} [results] @param {Array} [seed] A set of elements to match against
computeStyleTests
javascript
pallets-eco/flask-debugtoolbar
src/flask_debugtoolbar/static/js/jquery.js
https://github.com/pallets-eco/flask-debugtoolbar/blob/master/src/flask_debugtoolbar/static/js/jquery.js
BSD-3-Clause
function roundPixelMeasures( measure ) { return Math.round( parseFloat( measure ) ); }
A low-level selection function that works with jQuery's compiled selector functions @param {String|Function} selector A selector or a pre-compiled selector function built with jQuery selector compile @param {Element} context @param {Array} [results] @param {Array} [seed] A set of elements to match against
roundPixelMeasures
javascript
pallets-eco/flask-debugtoolbar
src/flask_debugtoolbar/static/js/jquery.js
https://github.com/pallets-eco/flask-debugtoolbar/blob/master/src/flask_debugtoolbar/static/js/jquery.js
BSD-3-Clause
function curCSS( elem, name, computed ) { var width, minWidth, maxWidth, ret, isCustomProp = rcustomProp.test( name ), // Support: Firefox 51+ // Retrieving style before computed somehow // fixes an issue with getting wrong values // on detached elements style = elem.style; computed = computed || getSty...
A low-level selection function that works with jQuery's compiled selector functions @param {String|Function} selector A selector or a pre-compiled selector function built with jQuery selector compile @param {Element} context @param {Array} [results] @param {Array} [seed] A set of elements to match against
curCSS
javascript
pallets-eco/flask-debugtoolbar
src/flask_debugtoolbar/static/js/jquery.js
https://github.com/pallets-eco/flask-debugtoolbar/blob/master/src/flask_debugtoolbar/static/js/jquery.js
BSD-3-Clause
function addGetHookIf( conditionFn, hookFn ) { // Define the hook, we'll check on the first run if it's really needed. return { get: function() { if ( conditionFn() ) { // Hook not needed (or it's not possible to use it due // to missing dependency), remove it. delete this.get; return; } ...
A low-level selection function that works with jQuery's compiled selector functions @param {String|Function} selector A selector or a pre-compiled selector function built with jQuery selector compile @param {Element} context @param {Array} [results] @param {Array} [seed] A set of elements to match against
addGetHookIf
javascript
pallets-eco/flask-debugtoolbar
src/flask_debugtoolbar/static/js/jquery.js
https://github.com/pallets-eco/flask-debugtoolbar/blob/master/src/flask_debugtoolbar/static/js/jquery.js
BSD-3-Clause
function vendorPropName( name ) { // Check for vendor prefixed names var capName = name[ 0 ].toUpperCase() + name.slice( 1 ), i = cssPrefixes.length; while ( i-- ) { name = cssPrefixes[ i ] + capName; if ( name in emptyStyle ) { return name; } } }
A low-level selection function that works with jQuery's compiled selector functions @param {String|Function} selector A selector or a pre-compiled selector function built with jQuery selector compile @param {Element} context @param {Array} [results] @param {Array} [seed] A set of elements to match against
vendorPropName
javascript
pallets-eco/flask-debugtoolbar
src/flask_debugtoolbar/static/js/jquery.js
https://github.com/pallets-eco/flask-debugtoolbar/blob/master/src/flask_debugtoolbar/static/js/jquery.js
BSD-3-Clause
function finalPropName( name ) { var final = jQuery.cssProps[ name ] || vendorProps[ name ]; if ( final ) { return final; } if ( name in emptyStyle ) { return name; } return vendorProps[ name ] = vendorPropName( name ) || name; }
A low-level selection function that works with jQuery's compiled selector functions @param {String|Function} selector A selector or a pre-compiled selector function built with jQuery selector compile @param {Element} context @param {Array} [results] @param {Array} [seed] A set of elements to match against
finalPropName
javascript
pallets-eco/flask-debugtoolbar
src/flask_debugtoolbar/static/js/jquery.js
https://github.com/pallets-eco/flask-debugtoolbar/blob/master/src/flask_debugtoolbar/static/js/jquery.js
BSD-3-Clause
function setPositiveNumber( _elem, value, subtract ) { // Any relative (+/-) values have already been // normalized at this point var matches = rcssNum.exec( value ); return matches ? // Guard against undefined "subtract", e.g., when used as in cssHooks Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matc...
A low-level selection function that works with jQuery's compiled selector functions @param {String|Function} selector A selector or a pre-compiled selector function built with jQuery selector compile @param {Element} context @param {Array} [results] @param {Array} [seed] A set of elements to match against
setPositiveNumber
javascript
pallets-eco/flask-debugtoolbar
src/flask_debugtoolbar/static/js/jquery.js
https://github.com/pallets-eco/flask-debugtoolbar/blob/master/src/flask_debugtoolbar/static/js/jquery.js
BSD-3-Clause
function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) { var i = dimension === "width" ? 1 : 0, extra = 0, delta = 0, marginDelta = 0; // Adjustment may not be necessary if ( box === ( isBorderBox ? "border" : "content" ) ) { return 0; } for ( ; i < 4; i += 2 ) { // Both...
A low-level selection function that works with jQuery's compiled selector functions @param {String|Function} selector A selector or a pre-compiled selector function built with jQuery selector compile @param {Element} context @param {Array} [results] @param {Array} [seed] A set of elements to match against
boxModelAdjustment
javascript
pallets-eco/flask-debugtoolbar
src/flask_debugtoolbar/static/js/jquery.js
https://github.com/pallets-eco/flask-debugtoolbar/blob/master/src/flask_debugtoolbar/static/js/jquery.js
BSD-3-Clause
function getWidthOrHeight( elem, dimension, extra ) { // Start with computed style var styles = getStyles( elem ), // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322). // Fake content-box until we know it's needed to know the true value. boxSizingNeeded = !support.boxSizingReliable() ||...
A low-level selection function that works with jQuery's compiled selector functions @param {String|Function} selector A selector or a pre-compiled selector function built with jQuery selector compile @param {Element} context @param {Array} [results] @param {Array} [seed] A set of elements to match against
getWidthOrHeight
javascript
pallets-eco/flask-debugtoolbar
src/flask_debugtoolbar/static/js/jquery.js
https://github.com/pallets-eco/flask-debugtoolbar/blob/master/src/flask_debugtoolbar/static/js/jquery.js
BSD-3-Clause
function Tween( elem, options, prop, end, easing ) { return new Tween.prototype.init( elem, options, prop, end, easing ); }
A low-level selection function that works with jQuery's compiled selector functions @param {String|Function} selector A selector or a pre-compiled selector function built with jQuery selector compile @param {Element} context @param {Array} [results] @param {Array} [seed] A set of elements to match against
Tween
javascript
pallets-eco/flask-debugtoolbar
src/flask_debugtoolbar/static/js/jquery.js
https://github.com/pallets-eco/flask-debugtoolbar/blob/master/src/flask_debugtoolbar/static/js/jquery.js
BSD-3-Clause
function schedule() { if ( inProgress ) { if ( document.hidden === false && window.requestAnimationFrame ) { window.requestAnimationFrame( schedule ); } else { window.setTimeout( schedule, jQuery.fx.interval ); } jQuery.fx.tick(); } }
A low-level selection function that works with jQuery's compiled selector functions @param {String|Function} selector A selector or a pre-compiled selector function built with jQuery selector compile @param {Element} context @param {Array} [results] @param {Array} [seed] A set of elements to match against
schedule
javascript
pallets-eco/flask-debugtoolbar
src/flask_debugtoolbar/static/js/jquery.js
https://github.com/pallets-eco/flask-debugtoolbar/blob/master/src/flask_debugtoolbar/static/js/jquery.js
BSD-3-Clause
function createFxNow() { window.setTimeout( function() { fxNow = undefined; } ); return ( fxNow = Date.now() ); }
A low-level selection function that works with jQuery's compiled selector functions @param {String|Function} selector A selector or a pre-compiled selector function built with jQuery selector compile @param {Element} context @param {Array} [results] @param {Array} [seed] A set of elements to match against
createFxNow
javascript
pallets-eco/flask-debugtoolbar
src/flask_debugtoolbar/static/js/jquery.js
https://github.com/pallets-eco/flask-debugtoolbar/blob/master/src/flask_debugtoolbar/static/js/jquery.js
BSD-3-Clause
function genFx( type, includeWidth ) { var which, i = 0, attrs = { height: type }; // If we include width, step value is 1 to do all cssExpand values, // otherwise step value is 2 to skip over Left and Right includeWidth = includeWidth ? 1 : 0; for ( ; i < 4; i += 2 - includeWidth ) { which = cssExpand[ i ]...
A low-level selection function that works with jQuery's compiled selector functions @param {String|Function} selector A selector or a pre-compiled selector function built with jQuery selector compile @param {Element} context @param {Array} [results] @param {Array} [seed] A set of elements to match against
genFx
javascript
pallets-eco/flask-debugtoolbar
src/flask_debugtoolbar/static/js/jquery.js
https://github.com/pallets-eco/flask-debugtoolbar/blob/master/src/flask_debugtoolbar/static/js/jquery.js
BSD-3-Clause
function createTween( value, prop, animation ) { var tween, collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ), index = 0, length = collection.length; for ( ; index < length; index++ ) { if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) { // We're don...
A low-level selection function that works with jQuery's compiled selector functions @param {String|Function} selector A selector or a pre-compiled selector function built with jQuery selector compile @param {Element} context @param {Array} [results] @param {Array} [seed] A set of elements to match against
createTween
javascript
pallets-eco/flask-debugtoolbar
src/flask_debugtoolbar/static/js/jquery.js
https://github.com/pallets-eco/flask-debugtoolbar/blob/master/src/flask_debugtoolbar/static/js/jquery.js
BSD-3-Clause
function defaultPrefilter( elem, props, opts ) { var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display, isBox = "width" in props || "height" in props, anim = this, orig = {}, style = elem.style, hidden = elem.nodeType && isHiddenWithinTree( elem ), dataShow = dataPriv.get( elem, "fxsh...
A low-level selection function that works with jQuery's compiled selector functions @param {String|Function} selector A selector or a pre-compiled selector function built with jQuery selector compile @param {Element} context @param {Array} [results] @param {Array} [seed] A set of elements to match against
defaultPrefilter
javascript
pallets-eco/flask-debugtoolbar
src/flask_debugtoolbar/static/js/jquery.js
https://github.com/pallets-eco/flask-debugtoolbar/blob/master/src/flask_debugtoolbar/static/js/jquery.js
BSD-3-Clause
function propFilter( props, specialEasing ) { var index, name, easing, value, hooks; // camelCase, specialEasing and expand cssHook pass for ( index in props ) { name = camelCase( index ); easing = specialEasing[ name ]; value = props[ index ]; if ( Array.isArray( value ) ) { easing = value[ 1 ]; valu...
A low-level selection function that works with jQuery's compiled selector functions @param {String|Function} selector A selector or a pre-compiled selector function built with jQuery selector compile @param {Element} context @param {Array} [results] @param {Array} [seed] A set of elements to match against
propFilter
javascript
pallets-eco/flask-debugtoolbar
src/flask_debugtoolbar/static/js/jquery.js
https://github.com/pallets-eco/flask-debugtoolbar/blob/master/src/flask_debugtoolbar/static/js/jquery.js
BSD-3-Clause
function Animation( elem, properties, options ) { var result, stopped, index = 0, length = Animation.prefilters.length, deferred = jQuery.Deferred().always( function() { // Don't match elem in the :animated selector delete tick.elem; } ), tick = function() { if ( stopped ) { return false; ...
A low-level selection function that works with jQuery's compiled selector functions @param {String|Function} selector A selector or a pre-compiled selector function built with jQuery selector compile @param {Element} context @param {Array} [results] @param {Array} [seed] A set of elements to match against
Animation
javascript
pallets-eco/flask-debugtoolbar
src/flask_debugtoolbar/static/js/jquery.js
https://github.com/pallets-eco/flask-debugtoolbar/blob/master/src/flask_debugtoolbar/static/js/jquery.js
BSD-3-Clause
tick = function() { if ( stopped ) { return false; } var currentTime = fxNow || createFxNow(), remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), // Support: Android 2.3 only // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (trac-12497) temp = r...
A low-level selection function that works with jQuery's compiled selector functions @param {String|Function} selector A selector or a pre-compiled selector function built with jQuery selector compile @param {Element} context @param {Array} [results] @param {Array} [seed] A set of elements to match against
tick
javascript
pallets-eco/flask-debugtoolbar
src/flask_debugtoolbar/static/js/jquery.js
https://github.com/pallets-eco/flask-debugtoolbar/blob/master/src/flask_debugtoolbar/static/js/jquery.js
BSD-3-Clause
doAnimation = function() { // Operate on a copy of prop so per-property easing won't be lost var anim = Animation( this, jQuery.extend( {}, prop ), optall ); // Empty animations, or finishing resolves immediately if ( empty || dataPriv.get( this, "finish" ) ) { anim.stop( true ); } }
A low-level selection function that works with jQuery's compiled selector functions @param {String|Function} selector A selector or a pre-compiled selector function built with jQuery selector compile @param {Element} context @param {Array} [results] @param {Array} [seed] A set of elements to match against
doAnimation
javascript
pallets-eco/flask-debugtoolbar
src/flask_debugtoolbar/static/js/jquery.js
https://github.com/pallets-eco/flask-debugtoolbar/blob/master/src/flask_debugtoolbar/static/js/jquery.js
BSD-3-Clause
stopQueue = function( hooks ) { var stop = hooks.stop; delete hooks.stop; stop( gotoEnd ); }
A low-level selection function that works with jQuery's compiled selector functions @param {String|Function} selector A selector or a pre-compiled selector function built with jQuery selector compile @param {Element} context @param {Array} [results] @param {Array} [seed] A set of elements to match against
stopQueue
javascript
pallets-eco/flask-debugtoolbar
src/flask_debugtoolbar/static/js/jquery.js
https://github.com/pallets-eco/flask-debugtoolbar/blob/master/src/flask_debugtoolbar/static/js/jquery.js
BSD-3-Clause
function stripAndCollapse( value ) { var tokens = value.match( rnothtmlwhite ) || []; return tokens.join( " " ); }
A low-level selection function that works with jQuery's compiled selector functions @param {String|Function} selector A selector or a pre-compiled selector function built with jQuery selector compile @param {Element} context @param {Array} [results] @param {Array} [seed] A set of elements to match against
stripAndCollapse
javascript
pallets-eco/flask-debugtoolbar
src/flask_debugtoolbar/static/js/jquery.js
https://github.com/pallets-eco/flask-debugtoolbar/blob/master/src/flask_debugtoolbar/static/js/jquery.js
BSD-3-Clause
function getClass( elem ) { return elem.getAttribute && elem.getAttribute( "class" ) || ""; }
A low-level selection function that works with jQuery's compiled selector functions @param {String|Function} selector A selector or a pre-compiled selector function built with jQuery selector compile @param {Element} context @param {Array} [results] @param {Array} [seed] A set of elements to match against
getClass
javascript
pallets-eco/flask-debugtoolbar
src/flask_debugtoolbar/static/js/jquery.js
https://github.com/pallets-eco/flask-debugtoolbar/blob/master/src/flask_debugtoolbar/static/js/jquery.js
BSD-3-Clause
function classesToArray( value ) { if ( Array.isArray( value ) ) { return value; } if ( typeof value === "string" ) { return value.match( rnothtmlwhite ) || []; } return []; }
A low-level selection function that works with jQuery's compiled selector functions @param {String|Function} selector A selector or a pre-compiled selector function built with jQuery selector compile @param {Element} context @param {Array} [results] @param {Array} [seed] A set of elements to match against
classesToArray
javascript
pallets-eco/flask-debugtoolbar
src/flask_debugtoolbar/static/js/jquery.js
https://github.com/pallets-eco/flask-debugtoolbar/blob/master/src/flask_debugtoolbar/static/js/jquery.js
BSD-3-Clause
function buildParams( prefix, obj, traditional, add ) { var name; if ( Array.isArray( obj ) ) { // Serialize array item. jQuery.each( obj, function( i, v ) { if ( traditional || rbracket.test( prefix ) ) { // Treat each array item as a scalar. add( prefix, v ); } else { // Item is non-scala...
A low-level selection function that works with jQuery's compiled selector functions @param {String|Function} selector A selector or a pre-compiled selector function built with jQuery selector compile @param {Element} context @param {Array} [results] @param {Array} [seed] A set of elements to match against
buildParams
javascript
pallets-eco/flask-debugtoolbar
src/flask_debugtoolbar/static/js/jquery.js
https://github.com/pallets-eco/flask-debugtoolbar/blob/master/src/flask_debugtoolbar/static/js/jquery.js
BSD-3-Clause
add = function( key, valueOrFunction ) { // If value is a function, invoke it and use its return value var value = isFunction( valueOrFunction ) ? valueOrFunction() : valueOrFunction; s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value == null ? "" : value ); }
A low-level selection function that works with jQuery's compiled selector functions @param {String|Function} selector A selector or a pre-compiled selector function built with jQuery selector compile @param {Element} context @param {Array} [results] @param {Array} [seed] A set of elements to match against
add
javascript
pallets-eco/flask-debugtoolbar
src/flask_debugtoolbar/static/js/jquery.js
https://github.com/pallets-eco/flask-debugtoolbar/blob/master/src/flask_debugtoolbar/static/js/jquery.js
BSD-3-Clause
function addToPrefiltersOrTransports( structure ) { // dataTypeExpression is optional and defaults to "*" return function( dataTypeExpression, func ) { if ( typeof dataTypeExpression !== "string" ) { func = dataTypeExpression; dataTypeExpression = "*"; } var dataType, i = 0, dataTypes = dataTypeE...
A low-level selection function that works with jQuery's compiled selector functions @param {String|Function} selector A selector or a pre-compiled selector function built with jQuery selector compile @param {Element} context @param {Array} [results] @param {Array} [seed] A set of elements to match against
addToPrefiltersOrTransports
javascript
pallets-eco/flask-debugtoolbar
src/flask_debugtoolbar/static/js/jquery.js
https://github.com/pallets-eco/flask-debugtoolbar/blob/master/src/flask_debugtoolbar/static/js/jquery.js
BSD-3-Clause
function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) { var inspected = {}, seekingTransport = ( structure === transports ); function inspect( dataType ) { var selected; inspected[ dataType ] = true; jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {...
A low-level selection function that works with jQuery's compiled selector functions @param {String|Function} selector A selector or a pre-compiled selector function built with jQuery selector compile @param {Element} context @param {Array} [results] @param {Array} [seed] A set of elements to match against
inspectPrefiltersOrTransports
javascript
pallets-eco/flask-debugtoolbar
src/flask_debugtoolbar/static/js/jquery.js
https://github.com/pallets-eco/flask-debugtoolbar/blob/master/src/flask_debugtoolbar/static/js/jquery.js
BSD-3-Clause
function inspect( dataType ) { var selected; inspected[ dataType ] = true; jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) { var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR ); if ( typeof dataTypeOrTransport === "string" && !seekingTransport && !...
A low-level selection function that works with jQuery's compiled selector functions @param {String|Function} selector A selector or a pre-compiled selector function built with jQuery selector compile @param {Element} context @param {Array} [results] @param {Array} [seed] A set of elements to match against
inspect
javascript
pallets-eco/flask-debugtoolbar
src/flask_debugtoolbar/static/js/jquery.js
https://github.com/pallets-eco/flask-debugtoolbar/blob/master/src/flask_debugtoolbar/static/js/jquery.js
BSD-3-Clause
function ajaxExtend( target, src ) { var key, deep, flatOptions = jQuery.ajaxSettings.flatOptions || {}; for ( key in src ) { if ( src[ key ] !== undefined ) { ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; } } if ( deep ) { jQuery.extend( true, target, deep ); } ret...
A low-level selection function that works with jQuery's compiled selector functions @param {String|Function} selector A selector or a pre-compiled selector function built with jQuery selector compile @param {Element} context @param {Array} [results] @param {Array} [seed] A set of elements to match against
ajaxExtend
javascript
pallets-eco/flask-debugtoolbar
src/flask_debugtoolbar/static/js/jquery.js
https://github.com/pallets-eco/flask-debugtoolbar/blob/master/src/flask_debugtoolbar/static/js/jquery.js
BSD-3-Clause
function ajaxHandleResponses( s, jqXHR, responses ) { var ct, type, finalDataType, firstDataType, contents = s.contents, dataTypes = s.dataTypes; // Remove auto dataType and get content-type in the process while ( dataTypes[ 0 ] === "*" ) { dataTypes.shift(); if ( ct === undefined ) { ct = s.mimeType ||...
A low-level selection function that works with jQuery's compiled selector functions @param {String|Function} selector A selector or a pre-compiled selector function built with jQuery selector compile @param {Element} context @param {Array} [results] @param {Array} [seed] A set of elements to match against
ajaxHandleResponses
javascript
pallets-eco/flask-debugtoolbar
src/flask_debugtoolbar/static/js/jquery.js
https://github.com/pallets-eco/flask-debugtoolbar/blob/master/src/flask_debugtoolbar/static/js/jquery.js
BSD-3-Clause
function ajaxConvert( s, response, jqXHR, isSuccess ) { var conv2, current, conv, tmp, prev, converters = {}, // Work with a copy of dataTypes in case we need to modify it for conversion dataTypes = s.dataTypes.slice(); // Create converters map with lowercased keys if ( dataTypes[ 1 ] ) { for ( conv in s.c...
A low-level selection function that works with jQuery's compiled selector functions @param {String|Function} selector A selector or a pre-compiled selector function built with jQuery selector compile @param {Element} context @param {Array} [results] @param {Array} [seed] A set of elements to match against
ajaxConvert
javascript
pallets-eco/flask-debugtoolbar
src/flask_debugtoolbar/static/js/jquery.js
https://github.com/pallets-eco/flask-debugtoolbar/blob/master/src/flask_debugtoolbar/static/js/jquery.js
BSD-3-Clause
function done( status, nativeStatusText, responses, headers ) { var isSuccess, success, error, response, modified, statusText = nativeStatusText; // Ignore repeat invocations if ( completed ) { return; } completed = true; // Clear timeout if it exists if ( timeoutTimer ) { window.cle...
A low-level selection function that works with jQuery's compiled selector functions @param {String|Function} selector A selector or a pre-compiled selector function built with jQuery selector compile @param {Element} context @param {Array} [results] @param {Array} [seed] A set of elements to match against
done
javascript
pallets-eco/flask-debugtoolbar
src/flask_debugtoolbar/static/js/jquery.js
https://github.com/pallets-eco/flask-debugtoolbar/blob/master/src/flask_debugtoolbar/static/js/jquery.js
BSD-3-Clause
updateColumnSort = function($el, index) { $el .removeClass( none ) .addClass( css[ index ] ) .attr( 'aria-sort', aria[ index ] ) .find( '.' + ts.css.icon ) .removeClass( cssIcon[ 2 ] ) .addClass( cssIcon[ index ] ); }
Add the table data to main data array
updateColumnSort
javascript
pallets-eco/flask-debugtoolbar
src/flask_debugtoolbar/static/js/jquery.tablesorter.js
https://github.com/pallets-eco/flask-debugtoolbar/blob/master/src/flask_debugtoolbar/static/js/jquery.tablesorter.js
BSD-3-Clause
callback = function( table ) { $( table ).triggerHandler( 'refreshComplete' ); }
Add the table data to main data array
callback
javascript
pallets-eco/flask-debugtoolbar
src/flask_debugtoolbar/static/js/jquery.tablesorter.js
https://github.com/pallets-eco/flask-debugtoolbar/blob/master/src/flask_debugtoolbar/static/js/jquery.tablesorter.js
BSD-3-Clause
async function create(options = {}) { const {initSkeleton} = require('./init-skeleton'); const BrunchError = require('./utils/error'); const loggy = require('loggy'); // Check for legacy syntax if (options.parent) { const rawArgs = options.parent.rawArgs; const newArgs = rawArgs.slice(rawArgs.indexOf...
Initialize new brunch project. @param {Object} options - skeleton like 'simple', path like '.'
create
javascript
brunch/brunch
lib/index.js
https://github.com/brunch/brunch/blob/master/lib/index.js
MIT
function build(options) { const hasDebug = obj => { return obj && typeof obj === 'object' && obj.debug; }; const isDebug = hasDebug(options); if (isDebug) { let ns = typeof isDebug === 'string' ? isDebug : '*'; if (ns !== 'speed') ns = `brunch:${ns}`; process.env.DEBUG = ns; } const {BrunchW...
Initialize new brunch project. @param {Object} options - skeleton like 'simple', path like '.'
build
javascript
brunch/brunch
lib/index.js
https://github.com/brunch/brunch/blob/master/lib/index.js
MIT
hasDebug = obj => { return obj && typeof obj === 'object' && obj.debug; }
Initialize new brunch project. @param {Object} options - skeleton like 'simple', path like '.'
hasDebug
javascript
brunch/brunch
lib/index.js
https://github.com/brunch/brunch/blob/master/lib/index.js
MIT
hasDebug = obj => { return obj && typeof obj === 'object' && obj.debug; }
Initialize new brunch project. @param {Object} options - skeleton like 'simple', path like '.'
hasDebug
javascript
brunch/brunch
lib/index.js
https://github.com/brunch/brunch/blob/master/lib/index.js
MIT
async function initSkeleton(alias, rootPath) { if (!alias) { alias = process.env.BRUNCH_INIT_SKELETON || 'https://github.com/brunch/dead-simple'; } const cwd = process.cwd(); rootPath = sysPath.resolve(rootPath || cwd); if (alias == null || alias === '.' && rootPath === cwd) { return printErrorBanner...
@param {string} alias filesystem path or skeleton url @param {string} rootPath @returns {Promise<boolean>}
initSkeleton
javascript
brunch/brunch
lib/init-skeleton.js
https://github.com/brunch/brunch/blob/master/lib/init-skeleton.js
MIT
function computeMinSampleSize(meta) { const scale = meta.iScale; const values = getAllScaleValues(scale, meta.type); let min = scale._length; let i, ilen, curr, prev; const updateMinAndPrev = () => { if (curr === 32767 || curr === -32768) { // Ignore truncated pixels return; } if (defi...
Computes the "optimal" sample size to maintain bars equally sized while preventing overlap. @private
computeMinSampleSize
javascript
chartjs/Chart.js
src/controllers/controller.bar.js
https://github.com/chartjs/Chart.js/blob/master/src/controllers/controller.bar.js
MIT
updateMinAndPrev = () => { if (curr === 32767 || curr === -32768) { // Ignore truncated pixels return; } if (defined(prev)) { // curr - prev === 0 is ignored min = Math.min(min, Math.abs(curr - prev) || min); } prev = curr; }
Computes the "optimal" sample size to maintain bars equally sized while preventing overlap. @private
updateMinAndPrev
javascript
chartjs/Chart.js
src/controllers/controller.bar.js
https://github.com/chartjs/Chart.js/blob/master/src/controllers/controller.bar.js
MIT
updateMinAndPrev = () => { if (curr === 32767 || curr === -32768) { // Ignore truncated pixels return; } if (defined(prev)) { // curr - prev === 0 is ignored min = Math.min(min, Math.abs(curr - prev) || min); } prev = curr; }
Computes the "optimal" sample size to maintain bars equally sized while preventing overlap. @private
updateMinAndPrev
javascript
chartjs/Chart.js
src/controllers/controller.bar.js
https://github.com/chartjs/Chart.js/blob/master/src/controllers/controller.bar.js
MIT
function computeFitCategoryTraits(index, ruler, options, stackCount) { const thickness = options.barThickness; let size, ratio; if (isNullOrUndef(thickness)) { size = ruler.min * options.categoryPercentage; ratio = options.barPercentage; } else { // When bar thickness is enforced, category and bar ...
Computes an "ideal" category based on the absolute bar thickness or, if undefined or null, uses the smallest interval (see computeMinSampleSize) that prevents bar overlapping. This mode currently always generates bars equally sized (until we introduce scriptable options?). @private
computeFitCategoryTraits
javascript
chartjs/Chart.js
src/controllers/controller.bar.js
https://github.com/chartjs/Chart.js/blob/master/src/controllers/controller.bar.js
MIT
function computeFlexCategoryTraits(index, ruler, options, stackCount) { const pixels = ruler.pixels; const curr = pixels[index]; let prev = index > 0 ? pixels[index - 1] : null; let next = index < pixels.length - 1 ? pixels[index + 1] : null; const percent = options.categoryPercentage; if (prev === null) {...
Computes an "optimal" category that globally arranges bars side by side (no gap when percentage options are 1), based on the previous and following categories. This mode generates bars with different widths when data are not evenly spaced. @private
computeFlexCategoryTraits
javascript
chartjs/Chart.js
src/controllers/controller.bar.js
https://github.com/chartjs/Chart.js/blob/master/src/controllers/controller.bar.js
MIT
function parseFloatBar(entry, item, vScale, i) { const startValue = vScale.parse(entry[0], i); const endValue = vScale.parse(entry[1], i); const min = Math.min(startValue, endValue); const max = Math.max(startValue, endValue); let barStart = min; let barEnd = max; if (Math.abs(min) > Math.abs(max)) { ...
Computes an "optimal" category that globally arranges bars side by side (no gap when percentage options are 1), based on the previous and following categories. This mode generates bars with different widths when data are not evenly spaced. @private
parseFloatBar
javascript
chartjs/Chart.js
src/controllers/controller.bar.js
https://github.com/chartjs/Chart.js/blob/master/src/controllers/controller.bar.js
MIT
function parseValue(entry, item, vScale, i) { if (isArray(entry)) { parseFloatBar(entry, item, vScale, i); } else { item[vScale.axis] = vScale.parse(entry, i); } return item; }
Computes an "optimal" category that globally arranges bars side by side (no gap when percentage options are 1), based on the previous and following categories. This mode generates bars with different widths when data are not evenly spaced. @private
parseValue
javascript
chartjs/Chart.js
src/controllers/controller.bar.js
https://github.com/chartjs/Chart.js/blob/master/src/controllers/controller.bar.js
MIT
function parseArrayOrPrimitive(meta, data, start, count) { const iScale = meta.iScale; const vScale = meta.vScale; const labels = iScale.getLabels(); const singleScale = iScale === vScale; const parsed = []; let i, ilen, item, entry; for (i = start, ilen = start + count; i < ilen; ++i) { entry = data...
Computes an "optimal" category that globally arranges bars side by side (no gap when percentage options are 1), based on the previous and following categories. This mode generates bars with different widths when data are not evenly spaced. @private
parseArrayOrPrimitive
javascript
chartjs/Chart.js
src/controllers/controller.bar.js
https://github.com/chartjs/Chart.js/blob/master/src/controllers/controller.bar.js
MIT
function isFloatBar(custom) { return custom && custom.barStart !== undefined && custom.barEnd !== undefined; }
Computes an "optimal" category that globally arranges bars side by side (no gap when percentage options are 1), based on the previous and following categories. This mode generates bars with different widths when data are not evenly spaced. @private
isFloatBar
javascript
chartjs/Chart.js
src/controllers/controller.bar.js
https://github.com/chartjs/Chart.js/blob/master/src/controllers/controller.bar.js
MIT
function barSign(size, vScale, actualBase) { if (size !== 0) { return sign(size); } return (vScale.isHorizontal() ? 1 : -1) * (vScale.min >= actualBase ? 1 : -1); }
Computes an "optimal" category that globally arranges bars side by side (no gap when percentage options are 1), based on the previous and following categories. This mode generates bars with different widths when data are not evenly spaced. @private
barSign
javascript
chartjs/Chart.js
src/controllers/controller.bar.js
https://github.com/chartjs/Chart.js/blob/master/src/controllers/controller.bar.js
MIT
function borderProps(properties) { let reverse, start, end, top, bottom; if (properties.horizontal) { reverse = properties.base > properties.x; start = 'left'; end = 'right'; } else { reverse = properties.base < properties.y; start = 'bottom'; end = 'top'; } if (reverse) { top = 'e...
Computes an "optimal" category that globally arranges bars side by side (no gap when percentage options are 1), based on the previous and following categories. This mode generates bars with different widths when data are not evenly spaced. @private
borderProps
javascript
chartjs/Chart.js
src/controllers/controller.bar.js
https://github.com/chartjs/Chart.js/blob/master/src/controllers/controller.bar.js
MIT
function setBorderSkipped(properties, options, stack, index) { let edge = options.borderSkipped; const res = {}; if (!edge) { properties.borderSkipped = res; return; } if (edge === true) { properties.borderSkipped = {top: true, right: true, bottom: true, left: true}; return; } const {st...
Computes an "optimal" category that globally arranges bars side by side (no gap when percentage options are 1), based on the previous and following categories. This mode generates bars with different widths when data are not evenly spaced. @private
setBorderSkipped
javascript
chartjs/Chart.js
src/controllers/controller.bar.js
https://github.com/chartjs/Chart.js/blob/master/src/controllers/controller.bar.js
MIT
function parseEdge(edge, a, b, reverse) { if (reverse) { edge = swap(edge, a, b); edge = startEnd(edge, b, a); } else { edge = startEnd(edge, a, b); } return edge; }
Computes an "optimal" category that globally arranges bars side by side (no gap when percentage options are 1), based on the previous and following categories. This mode generates bars with different widths when data are not evenly spaced. @private
parseEdge
javascript
chartjs/Chart.js
src/controllers/controller.bar.js
https://github.com/chartjs/Chart.js/blob/master/src/controllers/controller.bar.js
MIT
function swap(orig, v1, v2) { return orig === v1 ? v2 : orig === v2 ? v1 : orig; }
Computes an "optimal" category that globally arranges bars side by side (no gap when percentage options are 1), based on the previous and following categories. This mode generates bars with different widths when data are not evenly spaced. @private
swap
javascript
chartjs/Chart.js
src/controllers/controller.bar.js
https://github.com/chartjs/Chart.js/blob/master/src/controllers/controller.bar.js
MIT
function startEnd(v, start, end) { return v === 'start' ? start : v === 'end' ? end : v; }
Computes an "optimal" category that globally arranges bars side by side (no gap when percentage options are 1), based on the previous and following categories. This mode generates bars with different widths when data are not evenly spaced. @private
startEnd
javascript
chartjs/Chart.js
src/controllers/controller.bar.js
https://github.com/chartjs/Chart.js/blob/master/src/controllers/controller.bar.js
MIT
function setInflateAmount(properties, {inflateAmount}, ratio) { properties.inflateAmount = inflateAmount === 'auto' ? ratio === 1 ? 0.33 : 0 : inflateAmount; }
Computes an "optimal" category that globally arranges bars side by side (no gap when percentage options are 1), based on the previous and following categories. This mode generates bars with different widths when data are not evenly spaced. @private
setInflateAmount
javascript
chartjs/Chart.js
src/controllers/controller.bar.js
https://github.com/chartjs/Chart.js/blob/master/src/controllers/controller.bar.js
MIT
_getStacks(last, dataIndex) { const {iScale} = this._cachedMeta; const metasets = iScale.getMatchingVisibleMetas(this._type) .filter(meta => meta.controller.options.grouped); const stacked = iScale.options.stacked; const stacks = []; const currentParsed = this._cachedMeta.controller.getParsed(...
Returns the stacks based on groups and bar visibility. @param {number} [last] - The dataset index @param {number} [dataIndex] - The data index of the ruler @returns {string[]} The list of stack IDs @private
_getStacks
javascript
chartjs/Chart.js
src/controllers/controller.bar.js
https://github.com/chartjs/Chart.js/blob/master/src/controllers/controller.bar.js
MIT
skipNull = (meta) => { const parsed = meta._parsed.find(item => item[iScale.axis] === iScaleValue); const val = parsed && parsed[meta.vScale.axis]; if (isNullOrUndef(val) || isNaN(val)) { return true; } }
Returns the stacks based on groups and bar visibility. @param {number} [last] - The dataset index @param {number} [dataIndex] - The data index of the ruler @returns {string[]} The list of stack IDs @private
skipNull
javascript
chartjs/Chart.js
src/controllers/controller.bar.js
https://github.com/chartjs/Chart.js/blob/master/src/controllers/controller.bar.js
MIT
skipNull = (meta) => { const parsed = meta._parsed.find(item => item[iScale.axis] === iScaleValue); const val = parsed && parsed[meta.vScale.axis]; if (isNullOrUndef(val) || isNaN(val)) { return true; } }
Returns the stacks based on groups and bar visibility. @param {number} [last] - The dataset index @param {number} [dataIndex] - The data index of the ruler @returns {string[]} The list of stack IDs @private
skipNull
javascript
chartjs/Chart.js
src/controllers/controller.bar.js
https://github.com/chartjs/Chart.js/blob/master/src/controllers/controller.bar.js
MIT
_getStackCount(index) { return this._getStacks(undefined, index).length; }
Returns the effective number of stacks based on groups and bar visibility. @private
_getStackCount
javascript
chartjs/Chart.js
src/controllers/controller.bar.js
https://github.com/chartjs/Chart.js/blob/master/src/controllers/controller.bar.js
MIT
_getAxisCount() { return this._getAxis().length; }
Returns the effective number of stacks based on groups and bar visibility. @private
_getAxisCount
javascript
chartjs/Chart.js
src/controllers/controller.bar.js
https://github.com/chartjs/Chart.js/blob/master/src/controllers/controller.bar.js
MIT
getFirstScaleIdForIndexAxis() { const scales = this.chart.scales; const indexScaleId = this.chart.options.indexAxis; return Object.keys(scales).filter(key => scales[key].axis === indexScaleId).shift(); }
Returns the effective number of stacks based on groups and bar visibility. @private
getFirstScaleIdForIndexAxis
javascript
chartjs/Chart.js
src/controllers/controller.bar.js
https://github.com/chartjs/Chart.js/blob/master/src/controllers/controller.bar.js
MIT
_getAxis() { const axis = {}; const firstScaleAxisId = this.getFirstScaleIdForIndexAxis(); for (const dataset of this.chart.data.datasets) { axis[valueOrDefault( this.chart.options.indexAxis === 'x' ? dataset.xAxisID : dataset.yAxisID, firstScaleAxisId )] = true; } return Object....
Returns the effective number of stacks based on groups and bar visibility. @private
_getAxis
javascript
chartjs/Chart.js
src/controllers/controller.bar.js
https://github.com/chartjs/Chart.js/blob/master/src/controllers/controller.bar.js
MIT
_getStackIndex(datasetIndex, name, dataIndex) { const stacks = this._getStacks(datasetIndex, dataIndex); const index = (name !== undefined) ? stacks.indexOf(name) : -1; // indexOf returns -1 if element is not present return (index === -1) ? stacks.length - 1 : index; }
Returns the stack index for the given dataset based on groups and bar visibility. @param {number} [datasetIndex] - The dataset index @param {string} [name] - The stack name to find @param {number} [dataIndex] @returns {number} The stack index @private
_getStackIndex
javascript
chartjs/Chart.js
src/controllers/controller.bar.js
https://github.com/chartjs/Chart.js/blob/master/src/controllers/controller.bar.js
MIT
_calculateBarValuePixels(index) { const {_cachedMeta: {vScale, _stacked, index: datasetIndex}, options: {base: baseValue, minBarLength}} = this; const actualBase = baseValue || 0; const parsed = this.getParsed(index); const custom = parsed._custom; const floating = isFloatBar(custom); let value ...
Note: pixel values are not clamped to the scale area. @private
_calculateBarValuePixels
javascript
chartjs/Chart.js
src/controllers/controller.bar.js
https://github.com/chartjs/Chart.js/blob/master/src/controllers/controller.bar.js
MIT
resolveDataElementOptions(index, mode) { const parsed = this.getParsed(index); let values = super.resolveDataElementOptions(index, mode); // In case values were cached (and thus frozen), we need to clone the values if (values.$shared) { values = Object.assign({}, values, {$shared: false}); } ...
@param {number} index @param {string} [mode] @protected
resolveDataElementOptions
javascript
chartjs/Chart.js
src/controllers/controller.bubble.js
https://github.com/chartjs/Chart.js/blob/master/src/controllers/controller.bubble.js
MIT
function getRatioAndOffset(rotation, circumference, cutout) { let ratioX = 1; let ratioY = 1; let offsetX = 0; let offsetY = 0; // If the chart's circumference isn't a full circle, calculate size as a ratio of the width/height of the arc if (circumference < TAU) { const startAngle = rotation; const ...
@typedef { import('../core/core.controller.js').default } Chart
getRatioAndOffset
javascript
chartjs/Chart.js
src/controllers/controller.doughnut.js
https://github.com/chartjs/Chart.js/blob/master/src/controllers/controller.doughnut.js
MIT
parse(start, count) { const data = this.getDataset().data; const meta = this._cachedMeta; if (this._parsing === false) { meta._parsed = data; } else { let getter = (i) => +data[i]; if (isObject(data[start])) { const {key = 'value'} = this._parsing; getter = (i) => +re...
Override data parsing, since we are not using scales
parse
javascript
chartjs/Chart.js
src/controllers/controller.doughnut.js
https://github.com/chartjs/Chart.js/blob/master/src/controllers/controller.doughnut.js
MIT
_getRotationExtents() { let min = TAU; let max = -TAU; for (let i = 0; i < this.chart.data.datasets.length; ++i) { if (this.chart.isDatasetVisible(i) && this.chart.getDatasetMeta(i).type === this._type) { const controller = this.chart.getDatasetMeta(i).controller; const rotation = con...
Get the maximal rotation & circumference extents across all visible datasets.
_getRotationExtents
javascript
chartjs/Chart.js
src/controllers/controller.doughnut.js
https://github.com/chartjs/Chart.js/blob/master/src/controllers/controller.doughnut.js
MIT
_getRingWeightOffset(datasetIndex) { let ringWeightOffset = 0; for (let i = 0; i < datasetIndex; ++i) { if (this.chart.isDatasetVisible(i)) { ringWeightOffset += this._getRingWeight(i); } } return ringWeightOffset; }
Get radius length offset of the dataset in relation to the visible datasets weights. This allows determining the inner and outer radius correctly @private
_getRingWeightOffset
javascript
chartjs/Chart.js
src/controllers/controller.doughnut.js
https://github.com/chartjs/Chart.js/blob/master/src/controllers/controller.doughnut.js
MIT
_getVisibleDatasetWeightTotal() { return this._getRingWeightOffset(this.chart.data.datasets.length) || 1; }
Returns the sum of all visible data set weights. @private
_getVisibleDatasetWeightTotal
javascript
chartjs/Chart.js
src/controllers/controller.doughnut.js
https://github.com/chartjs/Chart.js/blob/master/src/controllers/controller.doughnut.js
MIT
color(from, to, factor) { const c0 = helpersColor(from || transparent); const c1 = c0.valid && helpersColor(to || transparent); return c1 && c1.valid ? c1.mix(c0, factor).hexString() : to; }
@param {string} from @param {string} to @param {number} factor
color
javascript
chartjs/Chart.js
src/core/core.animation.js
https://github.com/chartjs/Chart.js/blob/master/src/core/core.animation.js
MIT
number(from, to, factor) { return from + (to - from) * factor; }
@param {string} from @param {string} to @param {number} factor
number
javascript
chartjs/Chart.js
src/core/core.animation.js
https://github.com/chartjs/Chart.js/blob/master/src/core/core.animation.js
MIT
constructor(cfg, target, prop, to) { const currentValue = target[prop]; to = resolve([cfg.to, to, currentValue, cfg.from]); const from = resolve([cfg.from, currentValue, to]); this._active = true; this._fn = cfg.fn || interpolators[cfg.type || typeof from]; this._easing = effects[cfg.easing] |...
@param {string} from @param {string} to @param {number} factor
constructor
javascript
chartjs/Chart.js
src/core/core.animation.js
https://github.com/chartjs/Chart.js/blob/master/src/core/core.animation.js
MIT
active() { return this._active; }
@param {string} from @param {string} to @param {number} factor
active
javascript
chartjs/Chart.js
src/core/core.animation.js
https://github.com/chartjs/Chart.js/blob/master/src/core/core.animation.js
MIT
update(cfg, to, date) { if (this._active) { this._notify(false); const currentValue = this._target[this._prop]; const elapsed = date - this._start; const remain = this._duration - elapsed; this._start = date; this._duration = Math.floor(Math.max(remain, cfg.duration)); thi...
@param {string} from @param {string} to @param {number} factor
update
javascript
chartjs/Chart.js
src/core/core.animation.js
https://github.com/chartjs/Chart.js/blob/master/src/core/core.animation.js
MIT
cancel() { if (this._active) { // update current evaluated value, for smoother animations this.tick(Date.now()); this._active = false; this._notify(false); } }
@param {string} from @param {string} to @param {number} factor
cancel
javascript
chartjs/Chart.js
src/core/core.animation.js
https://github.com/chartjs/Chart.js/blob/master/src/core/core.animation.js
MIT
tick(date) { const elapsed = date - this._start; const duration = this._duration; const prop = this._prop; const from = this._from; const loop = this._loop; const to = this._to; let factor; this._active = from !== to && (loop || (elapsed < duration)); if (!this._active) { thi...
@param {string} from @param {string} to @param {number} factor
tick
javascript
chartjs/Chart.js
src/core/core.animation.js
https://github.com/chartjs/Chart.js/blob/master/src/core/core.animation.js
MIT
wait() { const promises = this._promises || (this._promises = []); return new Promise((res, rej) => { promises.push({res, rej}); }); }
@param {string} from @param {string} to @param {number} factor
wait
javascript
chartjs/Chart.js
src/core/core.animation.js
https://github.com/chartjs/Chart.js/blob/master/src/core/core.animation.js
MIT
_notify(resolved) { const method = resolved ? 'res' : 'rej'; const promises = this._promises || []; for (let i = 0; i < promises.length; i++) { promises[i][method](); } }
@param {string} from @param {string} to @param {number} factor
_notify
javascript
chartjs/Chart.js
src/core/core.animation.js
https://github.com/chartjs/Chart.js/blob/master/src/core/core.animation.js
MIT
_animateOptions(target, values) { const newOptions = values.options; const options = resolveTargetOptions(target, newOptions); if (!options) { return []; } const animations = this._createAnimations(options, newOptions); if (newOptions.$shared) { // Going to shared options: // ...
Utility to handle animation of `options`. @private
_animateOptions
javascript
chartjs/Chart.js
src/core/core.animations.js
https://github.com/chartjs/Chart.js/blob/master/src/core/core.animations.js
MIT
update(target, values) { if (this._properties.size === 0) { // Nothing is animated, just apply the new values. Object.assign(target, values); return; } const animations = this._createAnimations(target, values); if (animations.length) { animator.add(this._chart, animations); ...
Update `target` properties to new values, using configured animations @param {object} target - object to update @param {object} values - new target properties @returns {boolean|undefined} - `true` if animations were started
update
javascript
chartjs/Chart.js
src/core/core.animations.js
https://github.com/chartjs/Chart.js/blob/master/src/core/core.animations.js
MIT
function awaitAll(animations, properties) { const running = []; const keys = Object.keys(properties); for (let i = 0; i < keys.length; i++) { const anim = animations[keys[i]]; if (anim && anim.active()) { running.push(anim.wait()); } } // @ts-ignore return Promise.all(running); }
Update `target` properties to new values, using configured animations @param {object} target - object to update @param {object} values - new target properties @returns {boolean|undefined} - `true` if animations were started
awaitAll
javascript
chartjs/Chart.js
src/core/core.animations.js
https://github.com/chartjs/Chart.js/blob/master/src/core/core.animations.js
MIT
function resolveTargetOptions(target, newOptions) { if (!newOptions) { return; } let options = target.options; if (!options) { target.options = newOptions; return; } if (options.$shared) { // Going from shared options to distinct one: // Create new options object containing the old share...
Update `target` properties to new values, using configured animations @param {object} target - object to update @param {object} values - new target properties @returns {boolean|undefined} - `true` if animations were started
resolveTargetOptions
javascript
chartjs/Chart.js
src/core/core.animations.js
https://github.com/chartjs/Chart.js/blob/master/src/core/core.animations.js
MIT