Edit File by line
/home/barbar84/www/wp-inclu.../js/imgareas...
File: jquery.imgareaselect.js
* hide the selection and the outer area
[500] Fix | Delete
*/
[501] Fix | Delete
if (options.autoHide || selection.width * selection.height == 0)
[502] Fix | Delete
hide($box.add($outer), function () { $(this).hide(); });
[503] Fix | Delete
[504] Fix | Delete
$(document).off('mousemove touchmove', selectingMouseMove);
[505] Fix | Delete
$box.on('mousemove touchmove', areaMouseMove);
[506] Fix | Delete
[507] Fix | Delete
options.onSelectEnd(img, getSelection());
[508] Fix | Delete
}
[509] Fix | Delete
[510] Fix | Delete
/**
[511] Fix | Delete
* Selection area mousedown event handler
[512] Fix | Delete
*
[513] Fix | Delete
* @param event
[514] Fix | Delete
* The event object
[515] Fix | Delete
* @return false
[516] Fix | Delete
*/
[517] Fix | Delete
function areaMouseDown(event) {
[518] Fix | Delete
if (event.type == 'mousedown' && event.which != 1) return false;
[519] Fix | Delete
[520] Fix | Delete
/*
[521] Fix | Delete
* With mobile browsers, there is no "moving the pointer over" action,
[522] Fix | Delete
* so we need to simulate one mousemove event happening prior to
[523] Fix | Delete
* mousedown/touchstart.
[524] Fix | Delete
*/
[525] Fix | Delete
areaMouseMove(event);
[526] Fix | Delete
[527] Fix | Delete
adjust();
[528] Fix | Delete
[529] Fix | Delete
if (resize) {
[530] Fix | Delete
/* Resize mode is in effect */
[531] Fix | Delete
$('body').css('cursor', resize + '-resize');
[532] Fix | Delete
[533] Fix | Delete
x1 = viewX(selection[/w/.test(resize) ? 'x2' : 'x1']);
[534] Fix | Delete
y1 = viewY(selection[/n/.test(resize) ? 'y2' : 'y1']);
[535] Fix | Delete
[536] Fix | Delete
$(document).on('mousemove touchmove', selectingMouseMove)
[537] Fix | Delete
.one('mouseup touchend', docMouseUp);
[538] Fix | Delete
$box.off('mousemove touchmove', areaMouseMove);
[539] Fix | Delete
}
[540] Fix | Delete
else if (options.movable) {
[541] Fix | Delete
startX = left + selection.x1 - evX(event);
[542] Fix | Delete
startY = top + selection.y1 - evY(event);
[543] Fix | Delete
[544] Fix | Delete
$box.off('mousemove touchmove', areaMouseMove);
[545] Fix | Delete
[546] Fix | Delete
$(document).on('mousemove touchmove', movingMouseMove)
[547] Fix | Delete
.one('mouseup touchend', function () {
[548] Fix | Delete
options.onSelectEnd(img, getSelection());
[549] Fix | Delete
[550] Fix | Delete
$(document).off('mousemove touchmove', movingMouseMove);
[551] Fix | Delete
$box.on('mousemove touchmove', areaMouseMove);
[552] Fix | Delete
});
[553] Fix | Delete
}
[554] Fix | Delete
else
[555] Fix | Delete
$img.mousedown(event);
[556] Fix | Delete
[557] Fix | Delete
return false;
[558] Fix | Delete
}
[559] Fix | Delete
[560] Fix | Delete
/**
[561] Fix | Delete
* Adjust the x2/y2 coordinates to maintain aspect ratio (if defined)
[562] Fix | Delete
*
[563] Fix | Delete
* @param xFirst
[564] Fix | Delete
* If set to <code>true</code>, calculate x2 first. Otherwise,
[565] Fix | Delete
* calculate y2 first.
[566] Fix | Delete
*/
[567] Fix | Delete
function fixAspectRatio(xFirst) {
[568] Fix | Delete
if (aspectRatio)
[569] Fix | Delete
if (xFirst) {
[570] Fix | Delete
x2 = max(left, min(left + imgWidth,
[571] Fix | Delete
x1 + abs(y2 - y1) * aspectRatio * (x2 > x1 || -1)));
[572] Fix | Delete
y2 = round(max(top, min(top + imgHeight,
[573] Fix | Delete
y1 + abs(x2 - x1) / aspectRatio * (y2 > y1 || -1))));
[574] Fix | Delete
x2 = round(x2);
[575] Fix | Delete
}
[576] Fix | Delete
else {
[577] Fix | Delete
y2 = max(top, min(top + imgHeight,
[578] Fix | Delete
y1 + abs(x2 - x1) / aspectRatio * (y2 > y1 || -1)));
[579] Fix | Delete
x2 = round(max(left, min(left + imgWidth,
[580] Fix | Delete
x1 + abs(y2 - y1) * aspectRatio * (x2 > x1 || -1))));
[581] Fix | Delete
y2 = round(y2);
[582] Fix | Delete
}
[583] Fix | Delete
}
[584] Fix | Delete
[585] Fix | Delete
/**
[586] Fix | Delete
* Resize the selection area respecting the minimum/maximum dimensions and
[587] Fix | Delete
* aspect ratio
[588] Fix | Delete
*/
[589] Fix | Delete
function doResize() {
[590] Fix | Delete
/*
[591] Fix | Delete
* Make sure the top left corner of the selection area stays within
[592] Fix | Delete
* image boundaries (it might not if the image source was dynamically
[593] Fix | Delete
* changed).
[594] Fix | Delete
*/
[595] Fix | Delete
x1 = min(x1, left + imgWidth);
[596] Fix | Delete
y1 = min(y1, top + imgHeight);
[597] Fix | Delete
[598] Fix | Delete
if (abs(x2 - x1) < minWidth) {
[599] Fix | Delete
/* Selection width is smaller than minWidth */
[600] Fix | Delete
x2 = x1 - minWidth * (x2 < x1 || -1);
[601] Fix | Delete
[602] Fix | Delete
if (x2 < left)
[603] Fix | Delete
x1 = left + minWidth;
[604] Fix | Delete
else if (x2 > left + imgWidth)
[605] Fix | Delete
x1 = left + imgWidth - minWidth;
[606] Fix | Delete
}
[607] Fix | Delete
[608] Fix | Delete
if (abs(y2 - y1) < minHeight) {
[609] Fix | Delete
/* Selection height is smaller than minHeight */
[610] Fix | Delete
y2 = y1 - minHeight * (y2 < y1 || -1);
[611] Fix | Delete
[612] Fix | Delete
if (y2 < top)
[613] Fix | Delete
y1 = top + minHeight;
[614] Fix | Delete
else if (y2 > top + imgHeight)
[615] Fix | Delete
y1 = top + imgHeight - minHeight;
[616] Fix | Delete
}
[617] Fix | Delete
[618] Fix | Delete
x2 = max(left, min(x2, left + imgWidth));
[619] Fix | Delete
y2 = max(top, min(y2, top + imgHeight));
[620] Fix | Delete
[621] Fix | Delete
fixAspectRatio(abs(x2 - x1) < abs(y2 - y1) * aspectRatio);
[622] Fix | Delete
[623] Fix | Delete
if (abs(x2 - x1) > maxWidth) {
[624] Fix | Delete
/* Selection width is greater than maxWidth */
[625] Fix | Delete
x2 = x1 - maxWidth * (x2 < x1 || -1);
[626] Fix | Delete
fixAspectRatio();
[627] Fix | Delete
}
[628] Fix | Delete
[629] Fix | Delete
if (abs(y2 - y1) > maxHeight) {
[630] Fix | Delete
/* Selection height is greater than maxHeight */
[631] Fix | Delete
y2 = y1 - maxHeight * (y2 < y1 || -1);
[632] Fix | Delete
fixAspectRatio(true);
[633] Fix | Delete
}
[634] Fix | Delete
[635] Fix | Delete
selection = { x1: selX(min(x1, x2)), x2: selX(max(x1, x2)),
[636] Fix | Delete
y1: selY(min(y1, y2)), y2: selY(max(y1, y2)),
[637] Fix | Delete
width: abs(x2 - x1), height: abs(y2 - y1) };
[638] Fix | Delete
[639] Fix | Delete
update();
[640] Fix | Delete
[641] Fix | Delete
options.onSelectChange(img, getSelection());
[642] Fix | Delete
}
[643] Fix | Delete
[644] Fix | Delete
/**
[645] Fix | Delete
* Mousemove event handler triggered when the user is selecting an area
[646] Fix | Delete
*
[647] Fix | Delete
* @param event
[648] Fix | Delete
* The event object
[649] Fix | Delete
* @return false
[650] Fix | Delete
*/
[651] Fix | Delete
function selectingMouseMove(event) {
[652] Fix | Delete
x2 = /w|e|^$/.test(resize) || aspectRatio ? evX(event) : viewX(selection.x2);
[653] Fix | Delete
y2 = /n|s|^$/.test(resize) || aspectRatio ? evY(event) : viewY(selection.y2);
[654] Fix | Delete
[655] Fix | Delete
doResize();
[656] Fix | Delete
[657] Fix | Delete
return false;
[658] Fix | Delete
}
[659] Fix | Delete
[660] Fix | Delete
/**
[661] Fix | Delete
* Move the selection area
[662] Fix | Delete
*
[663] Fix | Delete
* @param newX1
[664] Fix | Delete
* New viewport X1
[665] Fix | Delete
* @param newY1
[666] Fix | Delete
* New viewport Y1
[667] Fix | Delete
*/
[668] Fix | Delete
function doMove(newX1, newY1) {
[669] Fix | Delete
x2 = (x1 = newX1) + selection.width;
[670] Fix | Delete
y2 = (y1 = newY1) + selection.height;
[671] Fix | Delete
[672] Fix | Delete
$.extend(selection, { x1: selX(x1), y1: selY(y1), x2: selX(x2),
[673] Fix | Delete
y2: selY(y2) });
[674] Fix | Delete
[675] Fix | Delete
update();
[676] Fix | Delete
[677] Fix | Delete
options.onSelectChange(img, getSelection());
[678] Fix | Delete
}
[679] Fix | Delete
[680] Fix | Delete
/**
[681] Fix | Delete
* Mousemove event handler triggered when the selection area is being moved
[682] Fix | Delete
*
[683] Fix | Delete
* @param event
[684] Fix | Delete
* The event object
[685] Fix | Delete
* @return false
[686] Fix | Delete
*/
[687] Fix | Delete
function movingMouseMove(event) {
[688] Fix | Delete
x1 = max(left, min(startX + evX(event), left + imgWidth - selection.width));
[689] Fix | Delete
y1 = max(top, min(startY + evY(event), top + imgHeight - selection.height));
[690] Fix | Delete
[691] Fix | Delete
doMove(x1, y1);
[692] Fix | Delete
[693] Fix | Delete
event.preventDefault();
[694] Fix | Delete
return false;
[695] Fix | Delete
}
[696] Fix | Delete
[697] Fix | Delete
/**
[698] Fix | Delete
* Start selection
[699] Fix | Delete
*/
[700] Fix | Delete
function startSelection() {
[701] Fix | Delete
$(document).off('mousemove touchmove', startSelection);
[702] Fix | Delete
adjust();
[703] Fix | Delete
[704] Fix | Delete
x2 = x1;
[705] Fix | Delete
y2 = y1;
[706] Fix | Delete
doResize();
[707] Fix | Delete
[708] Fix | Delete
resize = '';
[709] Fix | Delete
[710] Fix | Delete
if (!$outer.is(':visible'))
[711] Fix | Delete
/* Show the plugin elements */
[712] Fix | Delete
$box.add($outer).hide().fadeIn(options.fadeSpeed||0);
[713] Fix | Delete
[714] Fix | Delete
shown = true;
[715] Fix | Delete
[716] Fix | Delete
$(document).off('mouseup touchend', cancelSelection)
[717] Fix | Delete
.on('mousemove touchmove', selectingMouseMove)
[718] Fix | Delete
.one('mouseup touchend', docMouseUp);
[719] Fix | Delete
$box.off('mousemove touchmove', areaMouseMove);
[720] Fix | Delete
[721] Fix | Delete
options.onSelectStart(img, getSelection());
[722] Fix | Delete
}
[723] Fix | Delete
[724] Fix | Delete
/**
[725] Fix | Delete
* Cancel selection
[726] Fix | Delete
*/
[727] Fix | Delete
function cancelSelection() {
[728] Fix | Delete
$(document).off('mousemove touchmove', startSelection)
[729] Fix | Delete
.off('mouseup touchend', cancelSelection);
[730] Fix | Delete
hide($box.add($outer));
[731] Fix | Delete
[732] Fix | Delete
setSelection(selX(x1), selY(y1), selX(x1), selY(y1));
[733] Fix | Delete
[734] Fix | Delete
/* If this is an API call, callback functions should not be triggered */
[735] Fix | Delete
if (!(this instanceof $.imgAreaSelect)) {
[736] Fix | Delete
options.onSelectChange(img, getSelection());
[737] Fix | Delete
options.onSelectEnd(img, getSelection());
[738] Fix | Delete
}
[739] Fix | Delete
}
[740] Fix | Delete
[741] Fix | Delete
/**
[742] Fix | Delete
* Image mousedown event handler
[743] Fix | Delete
*
[744] Fix | Delete
* @param event
[745] Fix | Delete
* The event object
[746] Fix | Delete
* @return false
[747] Fix | Delete
*/
[748] Fix | Delete
function imgMouseDown(event) {
[749] Fix | Delete
/* Ignore the event if animation is in progress */
[750] Fix | Delete
if (event.which > 1 || $outer.is(':animated')) return false;
[751] Fix | Delete
[752] Fix | Delete
adjust();
[753] Fix | Delete
startX = x1 = evX(event);
[754] Fix | Delete
startY = y1 = evY(event);
[755] Fix | Delete
[756] Fix | Delete
/* Selection will start when the mouse is moved */
[757] Fix | Delete
$(document).on({ 'mousemove touchmove': startSelection,
[758] Fix | Delete
'mouseup touchend': cancelSelection });
[759] Fix | Delete
[760] Fix | Delete
return false;
[761] Fix | Delete
}
[762] Fix | Delete
[763] Fix | Delete
/**
[764] Fix | Delete
* Window resize event handler
[765] Fix | Delete
*/
[766] Fix | Delete
function windowResize() {
[767] Fix | Delete
doUpdate(false);
[768] Fix | Delete
}
[769] Fix | Delete
[770] Fix | Delete
/**
[771] Fix | Delete
* Image load event handler. This is the final part of the initialization
[772] Fix | Delete
* process.
[773] Fix | Delete
*/
[774] Fix | Delete
function imgLoad() {
[775] Fix | Delete
imgLoaded = true;
[776] Fix | Delete
[777] Fix | Delete
/* Set options */
[778] Fix | Delete
setOptions(options = $.extend({
[779] Fix | Delete
classPrefix: 'imgareaselect',
[780] Fix | Delete
movable: true,
[781] Fix | Delete
parent: 'body',
[782] Fix | Delete
resizable: true,
[783] Fix | Delete
resizeMargin: 10,
[784] Fix | Delete
onInit: function () {},
[785] Fix | Delete
onSelectStart: function () {},
[786] Fix | Delete
onSelectChange: function () {},
[787] Fix | Delete
onSelectEnd: function () {}
[788] Fix | Delete
}, options));
[789] Fix | Delete
[790] Fix | Delete
$box.add($outer).css({ visibility: '' });
[791] Fix | Delete
[792] Fix | Delete
if (options.show) {
[793] Fix | Delete
shown = true;
[794] Fix | Delete
adjust();
[795] Fix | Delete
update();
[796] Fix | Delete
$box.add($outer).hide().fadeIn(options.fadeSpeed||0);
[797] Fix | Delete
}
[798] Fix | Delete
[799] Fix | Delete
/*
[800] Fix | Delete
* Call the onInit callback. The setTimeout() call is used to ensure
[801] Fix | Delete
* that the plugin has been fully initialized and the object instance is
[802] Fix | Delete
* available (so that it can be obtained in the callback).
[803] Fix | Delete
*/
[804] Fix | Delete
setTimeout(function () { options.onInit(img, getSelection()); }, 0);
[805] Fix | Delete
}
[806] Fix | Delete
[807] Fix | Delete
/**
[808] Fix | Delete
* Document keypress event handler
[809] Fix | Delete
*
[810] Fix | Delete
* @param event
[811] Fix | Delete
* The event object
[812] Fix | Delete
* @return false
[813] Fix | Delete
*/
[814] Fix | Delete
var docKeyPress = function(event) {
[815] Fix | Delete
var k = options.keys, d, t, key = event.keyCode;
[816] Fix | Delete
[817] Fix | Delete
d = !isNaN(k.alt) && (event.altKey || event.originalEvent.altKey) ? k.alt :
[818] Fix | Delete
!isNaN(k.ctrl) && event.ctrlKey ? k.ctrl :
[819] Fix | Delete
!isNaN(k.shift) && event.shiftKey ? k.shift :
[820] Fix | Delete
!isNaN(k.arrows) ? k.arrows : 10;
[821] Fix | Delete
[822] Fix | Delete
if (k.arrows == 'resize' || (k.shift == 'resize' && event.shiftKey) ||
[823] Fix | Delete
(k.ctrl == 'resize' && event.ctrlKey) ||
[824] Fix | Delete
(k.alt == 'resize' && (event.altKey || event.originalEvent.altKey)))
[825] Fix | Delete
{
[826] Fix | Delete
/* Resize selection */
[827] Fix | Delete
[828] Fix | Delete
switch (key) {
[829] Fix | Delete
case 37:
[830] Fix | Delete
/* Left */
[831] Fix | Delete
d = -d;
[832] Fix | Delete
case 39:
[833] Fix | Delete
/* Right */
[834] Fix | Delete
t = max(x1, x2);
[835] Fix | Delete
x1 = min(x1, x2);
[836] Fix | Delete
x2 = max(t + d, x1);
[837] Fix | Delete
fixAspectRatio();
[838] Fix | Delete
break;
[839] Fix | Delete
case 38:
[840] Fix | Delete
/* Up */
[841] Fix | Delete
d = -d;
[842] Fix | Delete
case 40:
[843] Fix | Delete
/* Down */
[844] Fix | Delete
t = max(y1, y2);
[845] Fix | Delete
y1 = min(y1, y2);
[846] Fix | Delete
y2 = max(t + d, y1);
[847] Fix | Delete
fixAspectRatio(true);
[848] Fix | Delete
break;
[849] Fix | Delete
default:
[850] Fix | Delete
return;
[851] Fix | Delete
}
[852] Fix | Delete
[853] Fix | Delete
doResize();
[854] Fix | Delete
}
[855] Fix | Delete
else {
[856] Fix | Delete
/* Move selection */
[857] Fix | Delete
[858] Fix | Delete
x1 = min(x1, x2);
[859] Fix | Delete
y1 = min(y1, y2);
[860] Fix | Delete
[861] Fix | Delete
switch (key) {
[862] Fix | Delete
case 37:
[863] Fix | Delete
/* Left */
[864] Fix | Delete
doMove(max(x1 - d, left), y1);
[865] Fix | Delete
break;
[866] Fix | Delete
case 38:
[867] Fix | Delete
/* Up */
[868] Fix | Delete
doMove(x1, max(y1 - d, top));
[869] Fix | Delete
break;
[870] Fix | Delete
case 39:
[871] Fix | Delete
/* Right */
[872] Fix | Delete
doMove(x1 + min(d, imgWidth - selX(x2)), y1);
[873] Fix | Delete
break;
[874] Fix | Delete
case 40:
[875] Fix | Delete
/* Down */
[876] Fix | Delete
doMove(x1, y1 + min(d, imgHeight - selY(y2)));
[877] Fix | Delete
break;
[878] Fix | Delete
default:
[879] Fix | Delete
return;
[880] Fix | Delete
}
[881] Fix | Delete
}
[882] Fix | Delete
[883] Fix | Delete
return false;
[884] Fix | Delete
};
[885] Fix | Delete
[886] Fix | Delete
/**
[887] Fix | Delete
* Apply style options to plugin element (or multiple elements)
[888] Fix | Delete
*
[889] Fix | Delete
* @param $elem
[890] Fix | Delete
* A jQuery object representing the element(s) to style
[891] Fix | Delete
* @param props
[892] Fix | Delete
* An object that maps option names to corresponding CSS
[893] Fix | Delete
* properties
[894] Fix | Delete
*/
[895] Fix | Delete
function styleOptions($elem, props) {
[896] Fix | Delete
for (var option in props)
[897] Fix | Delete
if (options[option] !== undefined)
[898] Fix | Delete
$elem.css(props[option], options[option]);
[899] Fix | Delete
}
[900] Fix | Delete
[901] Fix | Delete
/**
[902] Fix | Delete
* Set plugin options
[903] Fix | Delete
*
[904] Fix | Delete
* @param newOptions
[905] Fix | Delete
* The new options object
[906] Fix | Delete
*/
[907] Fix | Delete
function setOptions(newOptions) {
[908] Fix | Delete
if (newOptions.parent)
[909] Fix | Delete
($parent = $(newOptions.parent)).append($box.add($outer));
[910] Fix | Delete
[911] Fix | Delete
/* Merge the new options with the existing ones */
[912] Fix | Delete
$.extend(options, newOptions);
[913] Fix | Delete
[914] Fix | Delete
adjust();
[915] Fix | Delete
[916] Fix | Delete
if (newOptions.handles != null) {
[917] Fix | Delete
/* Recreate selection area handles */
[918] Fix | Delete
$handles.remove();
[919] Fix | Delete
$handles = $([]);
[920] Fix | Delete
[921] Fix | Delete
i = newOptions.handles ? newOptions.handles == 'corners' ? 4 : 8 : 0;
[922] Fix | Delete
[923] Fix | Delete
while (i--)
[924] Fix | Delete
$handles = $handles.add(div());
[925] Fix | Delete
[926] Fix | Delete
/* Add a class to handles and set the CSS properties */
[927] Fix | Delete
$handles.addClass(options.classPrefix + '-handle').css({
[928] Fix | Delete
position: 'absolute',
[929] Fix | Delete
/*
[930] Fix | Delete
* The font-size property needs to be set to zero, otherwise
[931] Fix | Delete
* Internet Explorer makes the handles too large
[932] Fix | Delete
*/
[933] Fix | Delete
fontSize: '0',
[934] Fix | Delete
zIndex: zIndex + 1 || 1
[935] Fix | Delete
});
[936] Fix | Delete
[937] Fix | Delete
/*
[938] Fix | Delete
* If handle width/height has not been set with CSS rules, set the
[939] Fix | Delete
* default 5px
[940] Fix | Delete
*/
[941] Fix | Delete
if (!parseInt($handles.css('width')) >= 0)
[942] Fix | Delete
$handles.width(5).height(5);
[943] Fix | Delete
[944] Fix | Delete
/*
[945] Fix | Delete
* If the borderWidth option is in use, add a solid border to
[946] Fix | Delete
* handles
[947] Fix | Delete
*/
[948] Fix | Delete
if (o = options.borderWidth)
[949] Fix | Delete
$handles.css({ borderWidth: o, borderStyle: 'solid' });
[950] Fix | Delete
[951] Fix | Delete
/* Apply other style options */
[952] Fix | Delete
styleOptions($handles, { borderColor1: 'border-color',
[953] Fix | Delete
borderColor2: 'background-color',
[954] Fix | Delete
borderOpacity: 'opacity' });
[955] Fix | Delete
}
[956] Fix | Delete
[957] Fix | Delete
/* Calculate scale factors */
[958] Fix | Delete
scaleX = options.imageWidth / imgWidth || 1;
[959] Fix | Delete
scaleY = options.imageHeight / imgHeight || 1;
[960] Fix | Delete
[961] Fix | Delete
/* Set selection */
[962] Fix | Delete
if (newOptions.x1 != null) {
[963] Fix | Delete
setSelection(newOptions.x1, newOptions.y1, newOptions.x2,
[964] Fix | Delete
newOptions.y2);
[965] Fix | Delete
newOptions.show = !newOptions.hide;
[966] Fix | Delete
}
[967] Fix | Delete
[968] Fix | Delete
if (newOptions.keys)
[969] Fix | Delete
/* Enable keyboard support */
[970] Fix | Delete
options.keys = $.extend({ shift: 1, ctrl: 'resize' },
[971] Fix | Delete
newOptions.keys);
[972] Fix | Delete
[973] Fix | Delete
/* Add classes to plugin elements */
[974] Fix | Delete
$outer.addClass(options.classPrefix + '-outer');
[975] Fix | Delete
$area.addClass(options.classPrefix + '-selection');
[976] Fix | Delete
for (i = 0; i++ < 4;)
[977] Fix | Delete
$($border[i-1]).addClass(options.classPrefix + '-border' + i);
[978] Fix | Delete
[979] Fix | Delete
/* Apply style options */
[980] Fix | Delete
styleOptions($area, { selectionColor: 'background-color',
[981] Fix | Delete
selectionOpacity: 'opacity' });
[982] Fix | Delete
styleOptions($border, { borderOpacity: 'opacity',
[983] Fix | Delete
borderWidth: 'border-width' });
[984] Fix | Delete
styleOptions($outer, { outerColor: 'background-color',
[985] Fix | Delete
outerOpacity: 'opacity' });
[986] Fix | Delete
if (o = options.borderColor1)
[987] Fix | Delete
$($border[0]).css({ borderStyle: 'solid', borderColor: o });
[988] Fix | Delete
if (o = options.borderColor2)
[989] Fix | Delete
$($border[1]).css({ borderStyle: 'dashed', borderColor: o });
[990] Fix | Delete
[991] Fix | Delete
/* Append all the selection area elements to the container box */
[992] Fix | Delete
$box.append($area.add($border).add($areaOpera)).append($handles);
[993] Fix | Delete
[994] Fix | Delete
if (msie) {
[995] Fix | Delete
if (o = ($outer.css('filter')||'').match(/opacity=(\d+)/))
[996] Fix | Delete
$outer.css('opacity', o[1]/100);
[997] Fix | Delete
if (o = ($border.css('filter')||'').match(/opacity=(\d+)/))
[998] Fix | Delete
$border.css('opacity', o[1]/100);
[999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function