Lines Matching +full:tip +full:- +full:invert

2  * qTip2 - Pretty powerful tooltips - v2.1.1
30 …peration for this function. See more: http://ejohn.org/blog/ecmascript-5-strict-mode-json-and-more/
32 ;// Munge the primitives - Paul Irish tip
58 ATTR_HAS = 'data-hasqtip',
59 ATTR_ID = 'data-qtip-id',
60 WIDGET = ['ui-widget', 'ui-tooltip'],
64 CLASS_FIXED = NAMESPACE+'-fixed',
65 CLASS_DEFAULT = NAMESPACE + '-default',
66 CLASS_FOCUS = NAMESPACE + '-focus',
67 CLASS_HOVER = NAMESPACE + '-hover',
68 CLASS_DISABLED = NAMESPACE+'-disabled',
79 * Adapted from: http://ajaxian.com/archives/attack-of-the-ie-conditional-comment
84 while ((div.innerHTML = '<!--[if gt IE '+(++v)+']><i></i><![endif]-->')) {
94 …('' + (/CPU.*OS ([0-9_]{1,5})|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent) || [0,''…
107 this._id = NAMESPACE + '-' + id;
143 $.attr(this.target[0], 'aria-describedby', this._id);
148 …'class': [ NAMESPACE, CLASS_DEFAULT, options.style.classes, NAMESPACE + '-pos-' + options.position…
155 'aria-live': 'polite',
156 'aria-atomic': FALSE,
157 'aria-describedby': this._id + '-content',
158 'aria-hidden': TRUE
167 'class': NAMESPACE + '-content',
168 'id': this._id + '-content',
169 'aria-atomic': TRUE
174 this.rendered = -1;
268 .removeAttr('aria-describedby');
327 // DEPRECATED - Old content.ajax plugin functionality
397 new_id = NAMESPACE + '-' + id;
404 this.elements.content[0].id = this._id + '-content';
405 this.elements.title[0].id = this._id + '-title';
562 // Re-sanitize options
643 id = this._id+'-title';
650 'class': NAMESPACE + '-titlebar ' + (this.options.style.widget ? createWidgetClass('header') : '')
655 'class': NAMESPACE + '-title',
656 'aria-atomic': TRUE
661 // Button-specific events
662 .delegate('.qtip-close', 'mousedown keydown mouseup keyup mouseout', function(event) {
663 $(this).toggleClass('ui-state-active ui-state-focus', event.type.substr(-4) === 'down');
665 .delegate('.qtip-close', 'mouseover mouseout', function(event){
666 $(this).toggleClass('ui-state-hover', event.type === 'mouseover');
740 left: event.pageX - position.left + (offset && offset.left || 0),
741 top: event.pageY - position.top + (offset && offset.top || 0)
746 position.left -= mouse.scrollX - win.scrollLeft();
747 position.top -= mouse.scrollY - win.scrollTop();
807 // Adjust for position.fixed tooltips (and also iOS scroll bug in v3.2-4.0 & v4.3-4.3.2)
812 position.left -= win.scrollLeft();
813 position.top -= win.scrollTop();
824 position.left += adjust.x + (my.x === RIGHT ? -elemWidth : my.x === CENTER ? -elemWidth / 2 : 0);
825 position.top += adjust.y + (my.y === BOTTOM ? -elemHeight : my.y === CENTER ? -elemHeight / 2 : 0);
854 // Reset attributes to avoid cross-browser rendering bugs
882 // Compensate for non-static containers offset
887 scroll(ownerDocument, -1);
895 pos.left -= parentOffset.left + (parseFloat($.css(parent, 'marginLeft')) || 0);
896 pos.top -= parentOffset.top + (parseFloat($.css(parent, 'marginTop')) || 0);
914 corner = ('' + corner).replace(/([A-Z])/, ' $1').replace(/middle/gi, CENTER).toLowerCase();
923 C.invert = function(z, center) { function
978 // Check if the tooltip is in an identical state to the new would-be state
991 $.attr(tooltip[0], 'aria-hidden', !!!state);
1008 // Update the tooltip position (set width first to prevent viewport/max-width issues)
1036 // Define post-animation, state specific properties
1042 // Remove overflow setting to prevent tip bugs
1051 this.options.show.target.trigger('qtip-'+this.id+'-inactive');
1087 if(state) { opts.target.trigger('qtip-'+this.id+'-inactive'); }
1105 // Only update the z-index if it has changed and tooltip is not already focused
1109 // Only update z-index's if they've changed
1111 // Reduce our z-index's and keep them properly ordered
1114 this.style.zIndex = this.style.zIndex - 1;
1122 // Set the new z-index
1151 .attr('aria-disabled', state);
1178 'class': 'qtip-close ' + (this.options.style.widget ? '' : NAMESPACE+'-icon'),
1180 'aria-label': close
1184 'class': 'ui-icon ui-icon-close',
1211 return WIDGET.concat('').join(cls ? '-'+cls+' ' : ' ');
1223 CLASS_DISABLED = on ? 'ui-state-disabled' : 'qtip-disabled';
1226 …tooltip.toggleClass('ui-helper-reset '+createWidgetClass(), on).toggleClass(CLASS_DEFAULT, this.op…
1235 elements.button.toggleClass(NAMESPACE+'-icon', !on);
1315 var ns = '.' + this._id + (suffix ? '-'+suffix : '');
1322 $(targets).unbind('.' + this._id + (suffix ? '-'+suffix : ''));
1346 // Focus the tooltip on mouseenter (z-index stacking)
1425 if(('' + options.hide.event).indexOf('unfocus') > -1) {
1442 this._bind(showTarget, 'qtip-'+this.id+'-inactive', inactiveMethod);
1445 this._bind(hideTarget.add(tooltip), QTIP.inactiveEvents, inactiveMethod, '-inactive');
1453 if((showIndex > -1 && hideTarget.add(showTarget).length === hideTarget.length)) {
1477 if(abs(event.pageX - origin.pageX) >= limit || abs(event.pageY - origin.pageY) >= limit) {
1519 // Un-assignment method
1540 else { $(targets[0]).unbind('.'+this._id+'-create'); }
1560 // Grab data from metadata.name (or data-qtipopts as fallback) using .data() method,
1571 // Re-grab our positioning options now we've merged our metadata and set id to passed value
1611 // Add has-qtip attribute
1625 elem.one('remove.qtip-'+id+' removeqtip.qtip-'+id, function() {
1638 event = args[args.length - 1],
1698 namespace = '.qtip-'+id+'-create';
1700 // Initialize the qTip and re-grab newly sanitized options
1829 * http://code.jquery.com/ui/jquery-ui-git.js
1853 // Base z-index for all qTips
1927 ;var TIP, variable
1930 TIPNS = '.qtip-tip',
1936 BG_COLOR = 'background-color',
1946 // Camel-case method, taken from jQuery source
1947 // http://code.jquery.com/jquery-1.8.0.js
1952 * http://modernizr.com/downloads/modernizr-latest.js
1979 return '<qtipvml:'+tag+' xmlns="urn:schemas-microsoft.com:vml" class="qtip-vml" '+(props||'')+
1986 function Tip(qtip, options) { class
1987 this._ns = 'tip';
1996 $.extend(Tip.prototype, {
1998 var context, tip;
2000 // Create tip element and prepend to the tooltip
2001tip = this.element = qtip.elements.tip = $('<div />', { 'class': NAMESPACE+'-tip' }).prependTo(qti…
2003 // Create tip drawing element(s)
2017 … // Prevent mousing down on the tip since it causes problems with .live() handling in IE due to VML
2018 …qtip._bind( $('*', tip).add(tip), ['click', 'mousedown'], function(event) { event.stopPropagation(…
2089 tip = this.element.css('cssText', ''),
2094 // Attempt to detect the background colour from various elements, left-to-right precedance
2095 color[0] = css(tip, BG_COLOR) || css(colorElem, BG_COLOR) || css(elements.content, BG_COLOR) ||
2096 css(tooltip, BG_COLOR) || tip.css(BG_COLOR);
2098 …// Attempt to detect the correct border side colour from various elements, left-to-right precedance
2099 color[1] = css(tip, borderSide, COLOR) || css(colorElem, borderSide, COLOR) ||
2103 …$('*', tip).add(tip).css('cssText', BG_COLOR+':'+TRANSPARENT+IMPORTANT+';'+BORDER+':0'+IMPORTANT+'…
2121 hyp[2] = Math.sqrt( pow(hyp[0], 2) - pow(this.border, 2) );
2122 hyp[3] = Math.sqrt( pow(hyp[1], 2) - pow(this.border, 2) );
2132 // Tip coordinates calculator
2137 // Define tip coordinates in terms of height and width values
2157 // Determine tip corner
2160 // If we have a tip corner...
2169 // Toggle tip element
2179 tip = this.element,
2180 inner = tip.children(),
2188 // Re-determine tip if not already set
2207 // Ensure the tip width.height are relative to the tip position
2232 // Determine tip size
2234 tip.css({
2240 // Calculate tip translation
2243 …mimic.x === LEFT ? border : mimic.x === RIGHT ? newSize[0] - size[0] - border : (newSize[0] - size…
2244 round(mimic.y === TOP ? newSize[1] - size[1] : 0)
2249 round(mimic.x === LEFT ? newSize[0] - size[0] : 0),
2250 …mimic.y === TOP ? border : mimic.y === BOTTOM ? newSize[1] - size[1] - border : (newSize[1] - size…
2269 // Draw the tip
2281 if(tooltip.css('background-clip') === 'border-box') {
2297 // Setup VML-specific offset for pixel-perfection
2304 antialias: ''+(mimic.string().indexOf(CENTER) > -1),
2305 left: translate[0] - (translate[2] * Number(precedance === X)),
2306 top: translate[1] - (translate[2] * Number(precedance === Y)),
2339 tip = this.element,
2341 isWidget = this.qtip.tooltip.hasClass('ui-widget'),
2349 // Determine which tip dimension to use for adjustment
2356 // Calculate tip position
2363 position[MARGIN+'-' + b] = -Math.round(size[ precedance === Y ? 0 : 1 ] / 2) + userOffset;
2370 position[ side ] = Math.max(-self.border, i ? bc : (userOffset + (br > b ? br : -b)));
2374 // Adjust for tip size
2375 position[ corner[precedance] ] -= size[ precedance === X ? 0 : 1 ];
2378 tip.css({ margin: '', top: '', bottom: '', left: '', right: '' }).css(position);
2394 // If our tip position isn't fixed e.g. doesn't adjust with viewport...
2396 // Horizontal - Shift or flip method
2404 // Vertical - Shift or flip method
2412 // Update and redraw the tip if needed (check cached details of last drawn tip)
2418 // Setup tip offset properties
2422 if(offset.right !== undefined) { offset.left = -offset.right; }
2423 if(offset.bottom !== undefined) { offset.top = -offset.bottom; }
2429 css[MARGIN+'-left'] = shift.x = offset[MARGIN+'-left'] - adjust.left;
2433 [ adjust.left, -offset.left ] : [ -adjust.left, offset.left ];
2436 pos.left -= adjust.left;
2445 css[MARGIN+'-top'] = shift.y = offset[MARGIN+'-top'] - adjust.top;
2449 [ adjust.top, -offset.top ] : [ -adjust.top, offset.top ];
2452 pos.top -= adjust.top;
2461 * If the tip is adjusted in both dimensions, or in a
2469 // Adjust position to accomodate tip dimensions
2470 …pos.left -= offset.left.charAt ? offset.user : horizontal !== SHIFT || shift.top || !shift.left &&…
2471 …pos.top -= offset.top.charAt ? offset.user : vertical !== SHIFT || shift.left || !shift.left && !s…
2482 // Remove the tip element(s)
2483 if(this.qtip.elements.tip) {
2484 this.qtip.elements.tip.find('*')
2490 TIP = PLUGINS.tip = function(api) {
2491 return new Tip(api, api.options.style.tip);
2494 // Initialize tip on render
2495 TIP.initialize = 'render';
2498 TIP.sanitize = function(options) {
2499 if(options.style && 'tip' in options.style) {
2500 opts = options.style.tip;
2501 if(typeof opts !== 'object') { opts = options.style.tip = { corner: opts }; }
2507 CHECKS.tip = {
2508 '^position.my|style.tip.(corner|mimic|border)$': function() {
2509 // Make sure a tip can be drawn
2515 '^style.tip.(height|width)$': function(obj) {
2516 // Re-set dimensions and redraw the tip
2531 tip: { property
2555 tip = api.plugins.tip,
2586 viewportScroll = -container.offset[side1] + viewport.offset[side1] + viewport['scroll'+side1],
2587 myLength = mySide === side1 ? elemLength : mySide === side2 ? -elemLength : -elemLength / 2,
2588 … atLength = atSide === side1 ? targetLength : atSide === side2 ? -targetLength : -targetLength / 2,
2589 tipLength = tip && tip.size ? tip.size[lengthName] || 0 : 0,
2590 tipAdjust = tip && tip.corner && tip.corner.precedance === side && !isShift ? tipLength : 0,
2591 overflow1 = viewportScroll - initialPos + tipAdjust,
2592 overflow2 = initialPos + elemLength - viewport[lengthName] - viewportScroll + tipAdjust,
2593 …offset = myLength - (my.precedance === side || mySide === my[otherSide] ? atLength : 0) - (atSide …
2597 tipAdjust = tip && tip.corner && tip.corner.precedance === otherSide ? tipLength : 0;
2598 offset = (mySide === side1 ? 1 : -1) * myLength - tipAdjust;
2601 position[side1] += overflow1 > 0 ? overflow1 : overflow2 > 0 ? -overflow2 : 0;
2603-container.offset[side1] + viewport.offset[side1] + (tipAdjust && tip.corner[side] === CENTER ? ti…
2604 initialPos - offset,
2606 …Math.max(-container.offset[side1] + viewport.offset[side1] + viewport[lengthName], initialPos + of…
2619 position[side1] -= offset + adjust;
2620 newMy.invert(side, side1);
2625 position[side1] -= (mySide === CENTER ? -offset : offset) + adjust;
2626 newMy.invert(side, side2);
2630 if(position[side1] < viewportScroll && -position[side1] > overflow2) {
2635 return position[side1] - initialPos;
2648 if(newMy && cache.lastClass !== (newClass = NAMESPACE + '-pos-' + newMy.abbrev())) {