Lines Matching +full:restore +full:- +full:keys
2 * imagemapster - v1.5.4 - 2021-02-20
4 * Copyright (c) 2011 - 2021 James Treworgy
65 // https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md
66 // https://github.com/jquery/jquery/issues/2871#issuecomment-175175180
72 console.warn('non-passive events - listener not added');
209 // eslint-disable-next-line no-undef
213 // Deferred is frequently referred to as an anti-pattern largely
219 // eslint-disable-next-line no-undef
293 // not recursive - only copies 1 level of subobjects, and always merges
314 …* Basic indexOf implementation for IE7-8. Though we use $.inArray, some jQuery versions will try to
321 * @return {Number} The index of the item, or -1 if not found
332 return -1;
339 var result = obj.constructor === Array ? -1 : null;
362 // (todo - update this to handle variable lenght/more than one arg)
434 op + endOp / cbIntervals > endOp - 0.01
450 // - Missing/Empty value will be treated as 'rect' per spec
451 // - Avoid handling invalid values do to perf impact
452 // Note - IM currently does not support shape of 'default' so while its technically
454 // https://html.spec.whatwg.org/multipage/image-maps.html#the-area-element
492 return img ? this.utils.indexOfProp(this.map_cache, 'image', img) : -1;
542 // args: arguments to re-call with
652 return m.map_cache.push(map_data) - 1;
656 for (var i = m.map_cache.length - 1; i >= map_data.index; i--) {
657 m.map_cache[i].index--;
663 … * http://stackoverflow.com/questions/654112/how-do-you-detect-support-for-vml-or-svg-in-a-browser
721 // Issue #68 - ignore invalid data in areas array
761 …// Returns a comma-separated list of user-selected areas. "staticState" areas are not considered s…
800 // $(img).mapster('highlight') -- return highlighted area key, or null if none
801 // $(area).mapster('highlight') -- highlight an area
802 // $(img).mapster('highlight','area_key') -- highlight an area
803 // $(img).mapster('highlight',false) -- remove highlight
821 // Return the primary keys for an area or group key.
823 // includes all keys (not just primary keys)
825 // $(img).mapster('key','group-key')
827 // $(img).mapster('key','group-key', true)
828 me.keys = function (key, all) {
838 keys = [];
840 keys.push(ad.key);
844 keys = keys.concat(e.keys);
847 $.each(keys, function (_, e) {
881 … or unselect areas. Areas can be identified by a single string key, a comma-separated list of keys,
886 * @param {string|string[]} key A string, comma-separated string, or array of strings indicating
932 var keys;
945 keys = '';
950 keys = key.join(',');
953 keys = key;
956 if (keys) {
957 $.each(u.split(keys), function (_, key) {
1052 // set options - pass an object with options to set,
1068 for (i = m.map_cache.length - 1; i >= 0; i--) {
1130 // jQuery bug with Opera, results in full-url#usemap being returned from jQuery's attr.
1139 // sorry - your image must have border:0, things are too unpredictable otherwise.
1173 d.add('v', 'urn:schemas-microsoft-com:vml');
1244 // it's faster just to manipulate the passed options isMask property and restore it, than to
1349 // render includeKeys first - because they could be masks
1404 // configure remaining prototype methods for ie or canvas-supporting browser
1414 context.rect(c[0], c[1], c[2] - c[0], c[3] - c[1]);
1476 maskContext.restore();
1502 shapeContext.restore();
1524 shapeContext.restore();
1531 maskContext.globalCompositeOperation = 'source-out';
1623 (c[2] - c[0]) +
1625 (c[3] - c[1]) +
1665 (c[0] - c[2]) +
1667 (c[1] - c[2]) +
1785 /* interface to make this array-like */
1811 var index = ap.push.call(this, image) - 1;
1819 * @return {int} the index within the array, or -1 if it was not found
1840 * A list of the cross-reference IDs bound to this object
1847 * Length property for array-like behavior, set to zero when initializing. Array prototype
1942 while (i-- > 0) {
1954 if (triesLeft-- > 0) {
2067 highlightId: -1, // (int) the currently highlighted element.
2068 currentAreaId: -1,
2071 index: -1, // index of this in map_cache - so we have an ID to use for wraper div
2078 * Return an array of all image-containing options from an options object;
2256 me.currentAreaId = -1;
2291 $.inArray('area-mouseout', opts.toolTipClose) >= 0 &&
2440 // create context-bound event handlers from our private functions
2538 : -1;
2542 * Return a comma-separated string of all selected keys
2543 * @return {string} CSV of all keys that are currently selected
2557 * Get an array of MapAreas associated with a specific AREA based on the keys for that area
2579 … // TODO: this is a brittle model for capturing which specific area - if this method was not used,
2597 * Get the primary keys associated with an area group.
2601 * @return {string} A CSV of area keys
2615 * given an array of MapArea object, return an array of its unique primary keys
2617 * @return {string[]} An array of unique primary keys
2621 var keys = [];
2623 if ($.inArray(e.keys[0], keys) < 0) {
2624 keys.push(e.keys[0]);
2627 return keys;
2645 this.setHighlightId(-1);
2668 * @param {object[]} areas An array of objects containing area-specific options
2677 for (i = areas.length - 1; i >= 0; i--) {
2694 // keys: a comma-separated list
2695 drawSelections: function (keys) { argument
2697 key_arr = u.asArray(keys);
2699 for (i = key_arr.length - 1; i >= 0; i--) {
2751 return a === b ? 0 : a > b ? -1 : 1;
2755 return a === b ? 0 : a < b ? -1 : 1;
2826 …// Now we got what we needed from the copy -clone from the original image again to make sure any o…
2920 keys,
2931 dataItem.areaId = me._xref[key] = me.data.push(dataItem) - 1;
2943 opts.mapKey = 'data-mapster-key';
2962 // skip areas with no coords - selector broken for older ie
2970 $area.attr('data-mapster-key', curKey);
2979 mapArea = me.mapAreas[$area.data('mapster') - 1];
2987 keys = mapArea.keys; // converted to an array by mapArea
2990 for (j = keys.length - 1; j >= 0; j--) {
2991 key = keys[j];
3118 … // do not call ensure_no_highlight- we don't really want to unhilight it, just remove the effect
3139 // with a short-circuit if deep is required for full compare
3293 …// means this represents the first key in a list of keys (it's the area group that gets highlighte…
3295 areaId: -1,
3306 // (temporary storage) - the actual area moused over
3308 …// the last options used to render this. Cache so when re-drawing after a remove, changes in optio…
3380 * This should get the default options, and merge in area-specific options, finally
3405 * This should get the default options, merge in the areas-specific options,
3406 * and then the mode-specific options.
3465 m.MapArea = function (owner, areaEl, keys) { argument
3480 me.configure(keys);
3484 configure: function (keys) { argument
3485 this.keys = u.split(keys);
3554 …// with areas, all we know about is relative to the top-left corner of the image. We need to add a…
3628 maxX = maxY = bestMaxX = bestMaxY = -1;
3630 for (j = coords.length - 2; j >= 0; j -= 2) {
3658 [bestMaxX - width, minY - height],
3659 [bestMinX, minY - height],
3660 [minX - width, bestMaxY - height],
3661 [minX - width, bestMinY],
3662 [maxX, bestMaxY - height],
3664 [bestMaxX - width, maxY],
3676 // default to lower-right corner if nothing fit inside the boundaries of the image
3787 // restore highlight state if it was highlighted before
4005 width = me.wrapper.innerWidth() - scrollBarSize - padding * 2;
4006 height = me.wrapper.innerHeight() - scrollBarSize - padding * 2;
4007 diffX = corners.maxX - corners.minX;
4008 diffY = corners.maxY - corners.minY;
4012 offsetX = (width - diffX * ratio) / 2;
4013 offsetY = (height - diffY * ratio) / 2;
4017 scrollLeft = (corners.minX) * ratio - padding - offsetX;
4018 scrollTop = (corners.minY) * ratio - padding - offsetY;
4091 …olid black; background: #EEEEEE; width:160px; padding:4px; margin: 4px; -moz-box-shadow: 3px 3px 5…
4092 …'-webkit-box-shadow: 3px 3px 5px #535353; box-shadow: 3px 3px 5px #535353; -moz-border-radius: 6px…
4093 'border-radius: 6px 6px 6px 6px; opacity: 0.9;"></div>',
4097 toolTipClose: ['area-mouseout', 'image-mouseout', 'generic-mouseout'],
4133 // use a non-block type element.
4148 // We also cache the actual opacity setting to restore finally.
4150 tooltip.attr('data-opacity', tooltip.css('opacity')).css('opacity', 0);
4162 * @config {int} [left] The 0-based absolute x position for the tooltip
4163 * @config {int} [top] The 0-based absolute y position for the tooltip
4165 …* @config {bool} [fadeDuration] When non-zero, the duration in milliseconds of a fade-in effect f…
4173 actalOpacity = tooltip.attr('data-opacity') || 0,
4174 zindex = tooltip.css('z-index');
4177 tooltipCss['z-index'] = 9999;
4261 …* @config {bool} [fadeDuration] When non-zero, the duration in milliseconds of a fade-i…
4262 …* @config {int} [left] The 0-based absolute x position for the tooltip (only u…
4263 …* @config {int} [top] The 0-based absolute y position for the tooltip (only u…
4281 // Try to upper-left align it first, if that doesn't work, change the parameters
4310 …* @config {string} [closeEvents] A string with one or more comma-separated values that d…
4311 … closes: 'area-click','tooltip-click','image-mouseout','imag…
4316 …* @config {bool} [fadeDuration] When non-zero, the duration in milliseconds of a fade-i…
4337 'tooltip-click';
4389 'area-click',
4397 'tooltip-click',
4405 'image-mouseout',
4419 'image-click',
4479 * @param {object|string|jquery} [options] options to apply when creating this tooltip - OR -
4485 …* @config {string} [closeEvents] A string with one or more comma-separated values that de…
4486 … closes: 'area-click','tooltip-click','image-mouseout','image-click','generi…
4490 …* @config {bool} [fadeDuration] When non-zero, the duration in milliseconds of a fade-i…
4530 options.closeEvents || md.options.toolTipClose || 'tooltip-click';
4554 'tooltip-click',
4563 'generic-mouseout',
4572 'generic-click',