3.0 source code
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,136 +1,137 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
function CShapeColor(r, g, b) {
|
||||
this.r = r;
|
||||
this.g = g;
|
||||
this.b = b;
|
||||
this.darken = function () {
|
||||
var hslColor = RGBToHSL(this);
|
||||
hslColor.l *= 0.9;
|
||||
return HSLToRGB(hslColor);
|
||||
};
|
||||
this.darkenLess = function () {
|
||||
var hslColor = RGBToHSL(this);
|
||||
hslColor.l *= 0.85;
|
||||
return HSLToRGB(hslColor);
|
||||
};
|
||||
this.lighten = function () {
|
||||
var hslColor = RGBToHSL(this);
|
||||
hslColor.l *= 1.1;
|
||||
if (hslColor.l > 1) {
|
||||
hslColor.l = 1;
|
||||
}
|
||||
return HSLToRGB(hslColor);
|
||||
};
|
||||
this.lightenLess = function () {
|
||||
var hslColor = RGBToHSL(this);
|
||||
hslColor.l *= 1.1;
|
||||
if (hslColor.l > 1) {
|
||||
hslColor.l = 1;
|
||||
}
|
||||
return HSLToRGB(hslColor);
|
||||
};
|
||||
this.norm = function (a) {
|
||||
return this;
|
||||
};
|
||||
}
|
||||
function RGBToHSL(RGBColor) {
|
||||
var r, g, b;
|
||||
r = RGBColor.r / 255;
|
||||
g = RGBColor.g / 255;
|
||||
b = RGBColor.b / 255;
|
||||
var max, min;
|
||||
max = Math.max(r, g, b);
|
||||
min = Math.min(r, g, b);
|
||||
var h, s, l;
|
||||
h = max === min ? 0 : (max == r && g >= b) ? 60 * (g - b) / (max - min) : (max == r && g < b) ? 60 * (g - b) / (max - min) + 360 : (max == g) ? 60 * (b - r) / (max - min) + 120 : 60 * (r - g) / (max - min) + 240;
|
||||
l = (max + min) * 0.5;
|
||||
s = l > 0.5 ? (max - min) / (2 - max - min) : (max - min) / (max + min);
|
||||
while (h < 0) {
|
||||
h += 360;
|
||||
}
|
||||
while (h >= 360) {
|
||||
h -= 360;
|
||||
}
|
||||
return {
|
||||
h: h,
|
||||
s: s,
|
||||
l: l
|
||||
};
|
||||
}
|
||||
function HSLToRGB(HSLColor) {
|
||||
var h, s, l, r, g, b;
|
||||
h = HSLColor.h / 360;
|
||||
s = HSLColor.s;
|
||||
l = HSLColor.l;
|
||||
var q, p, tr, tg, tb;
|
||||
q = l < 0.5 ? (l * (1 + s)) : l + s - l * s;
|
||||
p = 2 * l - q;
|
||||
tr = h + 1 / 3;
|
||||
tg = h;
|
||||
tb = h - 1 / 3;
|
||||
if (tr < 0) {
|
||||
tr += 1;
|
||||
}
|
||||
if (tr > 1) {
|
||||
tr -= 1;
|
||||
}
|
||||
if (tg < 0) {
|
||||
tg += 1;
|
||||
}
|
||||
if (tg > 1) {
|
||||
tg -= 1;
|
||||
}
|
||||
if (tb < 0) {
|
||||
tb += 1;
|
||||
}
|
||||
if (tb > 1) {
|
||||
tb -= 1;
|
||||
}
|
||||
r = Math.round(255 * (tr < 1 / 6 ? p + ((q - p) * 6 * tr) : (1 / 6 < tr && tr < 1 / 2) ? q : (1 / 2 < tr && tr < 2 / 3) ? (p + ((q - p) * (2 / 3 - tr) * 6)) : p));
|
||||
g = Math.round(255 * (tg < 1 / 6 ? p + ((q - p) * 6 * tg) : (1 / 6 < tg && tg < 1 / 2) ? q : (1 / 2 < tg && tg < 2 / 3) ? (p + ((q - p) * (2 / 3 - tg) * 6)) : p));
|
||||
b = Math.round(255 * (tb < 1 / 6 ? p + ((q - p) * 6 * tb) : (1 / 6 < tb && tb < 1 / 2) ? q : (1 / 2 < tb && tb < 2 / 3) ? (p + ((q - p) * (2 / 3 - tb) * 6)) : p));
|
||||
if (r > 255) {
|
||||
r = 255;
|
||||
}
|
||||
if (g > 255) {
|
||||
g = 255;
|
||||
}
|
||||
if (b > 255) {
|
||||
b = 255;
|
||||
}
|
||||
return {
|
||||
r: r,
|
||||
g: g,
|
||||
b: b
|
||||
};
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2015
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
"use strict";
|
||||
function CShapeColor(r, g, b) {
|
||||
this.r = r;
|
||||
this.g = g;
|
||||
this.b = b;
|
||||
this.darken = function () {
|
||||
var hslColor = RGBToHSL(this);
|
||||
hslColor.l *= 0.9;
|
||||
return HSLToRGB(hslColor);
|
||||
};
|
||||
this.darkenLess = function () {
|
||||
var hslColor = RGBToHSL(this);
|
||||
hslColor.l *= 0.85;
|
||||
return HSLToRGB(hslColor);
|
||||
};
|
||||
this.lighten = function () {
|
||||
var hslColor = RGBToHSL(this);
|
||||
hslColor.l *= 1.1;
|
||||
if (hslColor.l > 1) {
|
||||
hslColor.l = 1;
|
||||
}
|
||||
return HSLToRGB(hslColor);
|
||||
};
|
||||
this.lightenLess = function () {
|
||||
var hslColor = RGBToHSL(this);
|
||||
hslColor.l *= 1.1;
|
||||
if (hslColor.l > 1) {
|
||||
hslColor.l = 1;
|
||||
}
|
||||
return HSLToRGB(hslColor);
|
||||
};
|
||||
this.norm = function (a) {
|
||||
return this;
|
||||
};
|
||||
}
|
||||
function RGBToHSL(RGBColor) {
|
||||
var r, g, b;
|
||||
r = RGBColor.r / 255;
|
||||
g = RGBColor.g / 255;
|
||||
b = RGBColor.b / 255;
|
||||
var max, min;
|
||||
max = Math.max(r, g, b);
|
||||
min = Math.min(r, g, b);
|
||||
var h, s, l;
|
||||
h = max === min ? 0 : (max == r && g >= b) ? 60 * (g - b) / (max - min) : (max == r && g < b) ? 60 * (g - b) / (max - min) + 360 : (max == g) ? 60 * (b - r) / (max - min) + 120 : 60 * (r - g) / (max - min) + 240;
|
||||
l = (max + min) * 0.5;
|
||||
s = l > 0.5 ? (max - min) / (2 - max - min) : (max - min) / (max + min);
|
||||
while (h < 0) {
|
||||
h += 360;
|
||||
}
|
||||
while (h >= 360) {
|
||||
h -= 360;
|
||||
}
|
||||
return {
|
||||
h: h,
|
||||
s: s,
|
||||
l: l
|
||||
};
|
||||
}
|
||||
function HSLToRGB(HSLColor) {
|
||||
var h, s, l, r, g, b;
|
||||
h = HSLColor.h / 360;
|
||||
s = HSLColor.s;
|
||||
l = HSLColor.l;
|
||||
var q, p, tr, tg, tb;
|
||||
q = l < 0.5 ? (l * (1 + s)) : l + s - l * s;
|
||||
p = 2 * l - q;
|
||||
tr = h + 1 / 3;
|
||||
tg = h;
|
||||
tb = h - 1 / 3;
|
||||
if (tr < 0) {
|
||||
tr += 1;
|
||||
}
|
||||
if (tr > 1) {
|
||||
tr -= 1;
|
||||
}
|
||||
if (tg < 0) {
|
||||
tg += 1;
|
||||
}
|
||||
if (tg > 1) {
|
||||
tg -= 1;
|
||||
}
|
||||
if (tb < 0) {
|
||||
tb += 1;
|
||||
}
|
||||
if (tb > 1) {
|
||||
tb -= 1;
|
||||
}
|
||||
r = Math.round(255 * (tr < 1 / 6 ? p + ((q - p) * 6 * tr) : (1 / 6 < tr && tr < 1 / 2) ? q : (1 / 2 < tr && tr < 2 / 3) ? (p + ((q - p) * (2 / 3 - tr) * 6)) : p));
|
||||
g = Math.round(255 * (tg < 1 / 6 ? p + ((q - p) * 6 * tg) : (1 / 6 < tg && tg < 1 / 2) ? q : (1 / 2 < tg && tg < 2 / 3) ? (p + ((q - p) * (2 / 3 - tg) * 6)) : p));
|
||||
b = Math.round(255 * (tb < 1 / 6 ? p + ((q - p) * 6 * tb) : (1 / 6 < tb && tb < 1 / 2) ? q : (1 / 2 < tb && tb < 2 / 3) ? (p + ((q - p) * (2 / 3 - tb) * 6)) : p));
|
||||
if (r > 255) {
|
||||
r = 255;
|
||||
}
|
||||
if (g > 255) {
|
||||
g = 255;
|
||||
}
|
||||
if (b > 255) {
|
||||
b = 255;
|
||||
}
|
||||
return {
|
||||
r: r,
|
||||
g: g,
|
||||
b: b
|
||||
};
|
||||
}
|
||||
@@ -1,369 +1,382 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
function CBounds() {
|
||||
this.L = 0;
|
||||
this.T = 0;
|
||||
this.R = 0;
|
||||
this.B = 0;
|
||||
this.isAbsL = false;
|
||||
this.isAbsT = false;
|
||||
this.isAbsR = false;
|
||||
this.isAbsB = false;
|
||||
this.AbsW = -1;
|
||||
this.AbsH = -1;
|
||||
this.SetParams = function (_l, _t, _r, _b, abs_l, abs_t, abs_r, abs_b, absW, absH) {
|
||||
this.L = _l;
|
||||
this.T = _t;
|
||||
this.R = _r;
|
||||
this.B = _b;
|
||||
this.isAbsL = abs_l;
|
||||
this.isAbsT = abs_t;
|
||||
this.isAbsR = abs_r;
|
||||
this.isAbsB = abs_b;
|
||||
this.AbsW = absW;
|
||||
this.AbsH = absH;
|
||||
};
|
||||
}
|
||||
function CAbsolutePosition() {
|
||||
this.L = 0;
|
||||
this.T = 0;
|
||||
this.R = 0;
|
||||
this.B = 0;
|
||||
}
|
||||
var g_anchor_left = 1;
|
||||
var g_anchor_top = 2;
|
||||
var g_anchor_right = 4;
|
||||
var g_anchor_bottom = 8;
|
||||
function CControl() {
|
||||
this.Bounds = new CBounds();
|
||||
this.Anchor = g_anchor_left | g_anchor_top;
|
||||
this.Name = null;
|
||||
this.Parent = null;
|
||||
this.TabIndex = null;
|
||||
this.HtmlElement = null;
|
||||
this.AbsolutePosition = new CBounds();
|
||||
this.Resize = function (_width, _height, api) {
|
||||
if ((null == this.Parent) || (null == this.HtmlElement)) {
|
||||
return;
|
||||
}
|
||||
var _x = 0;
|
||||
var _y = 0;
|
||||
var _r = 0;
|
||||
var _b = 0;
|
||||
var hor_anchor = (this.Anchor & 5);
|
||||
var ver_anchor = (this.Anchor & 10);
|
||||
if (g_anchor_left == hor_anchor) {
|
||||
if (this.Bounds.isAbsL) {
|
||||
_x = this.Bounds.L;
|
||||
} else {
|
||||
_x = (this.Bounds.L * _width / 1000);
|
||||
}
|
||||
if (-1 != this.Bounds.AbsW) {
|
||||
_r = _x + this.Bounds.AbsW;
|
||||
} else {
|
||||
if (this.Bounds.isAbsR) {
|
||||
_r = (_width - this.Bounds.R);
|
||||
} else {
|
||||
_r = this.Bounds.R * _width / 1000;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (g_anchor_right == hor_anchor) {
|
||||
if (this.Bounds.isAbsR) {
|
||||
_r = (_width - this.Bounds.R);
|
||||
} else {
|
||||
_r = (this.Bounds.R * _width / 1000);
|
||||
}
|
||||
if (-1 != this.Bounds.AbsW) {
|
||||
_x = _r - this.Bounds.AbsW;
|
||||
} else {
|
||||
if (this.Bounds.isAbsL) {
|
||||
_x = this.Bounds.L;
|
||||
} else {
|
||||
_x = this.Bounds.L * _width / 1000;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ((g_anchor_left | g_anchor_right) == hor_anchor) {
|
||||
if (this.Bounds.isAbsL) {
|
||||
_x = this.Bounds.L;
|
||||
} else {
|
||||
_x = (this.Bounds.L * _width / 1000);
|
||||
}
|
||||
if (this.Bounds.isAbsR) {
|
||||
_r = (_width - this.Bounds.R);
|
||||
} else {
|
||||
_r = (this.Bounds.R * _width / 1000);
|
||||
}
|
||||
} else {
|
||||
_x = this.Bounds.L;
|
||||
_r = this.Bounds.R;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (g_anchor_top == ver_anchor) {
|
||||
if (this.Bounds.isAbsT) {
|
||||
_y = this.Bounds.T;
|
||||
} else {
|
||||
_y = (this.Bounds.T * _height / 1000);
|
||||
}
|
||||
if (-1 != this.Bounds.AbsH) {
|
||||
_b = _y + this.Bounds.AbsH;
|
||||
} else {
|
||||
if (this.Bounds.isAbsB) {
|
||||
_b = (_height - this.Bounds.B);
|
||||
} else {
|
||||
_b = this.Bounds.B * _height / 1000;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (g_anchor_bottom == ver_anchor) {
|
||||
if (this.Bounds.isAbsB) {
|
||||
_b = (_height - this.Bounds.B);
|
||||
} else {
|
||||
_b = (this.Bounds.B * _height / 1000);
|
||||
}
|
||||
if (-1 != this.Bounds.AbsH) {
|
||||
_y = _b - this.Bounds.AbsH;
|
||||
} else {
|
||||
if (this.Bounds.isAbsT) {
|
||||
_y = this.Bounds.T;
|
||||
} else {
|
||||
_y = this.Bounds.T * _height / 1000;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ((g_anchor_top | g_anchor_bottom) == ver_anchor) {
|
||||
if (this.Bounds.isAbsT) {
|
||||
_y = this.Bounds.T;
|
||||
} else {
|
||||
_y = (this.Bounds.T * _height / 1000);
|
||||
}
|
||||
if (this.Bounds.isAbsB) {
|
||||
_b = (_height - this.Bounds.B);
|
||||
} else {
|
||||
_b = (this.Bounds.B * _height / 1000);
|
||||
}
|
||||
} else {
|
||||
_y = this.Bounds.T;
|
||||
_b = this.Bounds.B;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (_r < _x) {
|
||||
_r = _x;
|
||||
}
|
||||
if (_b < _y) {
|
||||
_b = _y;
|
||||
}
|
||||
this.AbsolutePosition.L = _x;
|
||||
this.AbsolutePosition.T = _y;
|
||||
this.AbsolutePosition.R = _r;
|
||||
this.AbsolutePosition.B = _b;
|
||||
this.HtmlElement.style.left = ((_x * g_dKoef_mm_to_pix + 0.5) >> 0) + "px";
|
||||
this.HtmlElement.style.top = ((_y * g_dKoef_mm_to_pix + 0.5) >> 0) + "px";
|
||||
this.HtmlElement.style.width = (((_r - _x) * g_dKoef_mm_to_pix + 0.5) >> 0) + "px";
|
||||
this.HtmlElement.style.height = (((_b - _y) * g_dKoef_mm_to_pix + 0.5) >> 0) + "px";
|
||||
if (api !== undefined && api.CheckRetinaElement && api.CheckRetinaElement(this.HtmlElement)) {
|
||||
var _W = ((_r - _x) * g_dKoef_mm_to_pix + 0.5) >> 0;
|
||||
var _H = ((_b - _y) * g_dKoef_mm_to_pix + 0.5) >> 0;
|
||||
this.HtmlElement.width = _W << 1;
|
||||
this.HtmlElement.height = _H << 1;
|
||||
} else {
|
||||
this.HtmlElement.width = ((_r - _x) * g_dKoef_mm_to_pix + 0.5) >> 0;
|
||||
this.HtmlElement.height = ((_b - _y) * g_dKoef_mm_to_pix + 0.5) >> 0;
|
||||
}
|
||||
};
|
||||
}
|
||||
function CControlContainer() {
|
||||
this.Bounds = new CBounds();
|
||||
this.Anchor = g_anchor_left | g_anchor_top;
|
||||
this.Name = null;
|
||||
this.Parent = null;
|
||||
this.TabIndex = null;
|
||||
this.HtmlElement = null;
|
||||
this.AbsolutePosition = new CBounds();
|
||||
this.Controls = new Array();
|
||||
this.AddControl = function (ctrl) {
|
||||
ctrl.Parent = this;
|
||||
this.Controls[this.Controls.length] = ctrl;
|
||||
};
|
||||
this.Resize = function (_width, _height, api) {
|
||||
if (null == this.Parent) {
|
||||
this.AbsolutePosition.L = 0;
|
||||
this.AbsolutePosition.T = 0;
|
||||
this.AbsolutePosition.R = _width;
|
||||
this.AbsolutePosition.B = _height;
|
||||
if (null != this.HtmlElement) {
|
||||
var lCount = this.Controls.length;
|
||||
for (var i = 0; i < lCount; i++) {
|
||||
this.Controls[i].Resize(_width, _height, api);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
var _x = 0;
|
||||
var _y = 0;
|
||||
var _r = 0;
|
||||
var _b = 0;
|
||||
var hor_anchor = (this.Anchor & 5);
|
||||
var ver_anchor = (this.Anchor & 10);
|
||||
if (g_anchor_left == hor_anchor) {
|
||||
if (this.Bounds.isAbsL) {
|
||||
_x = this.Bounds.L;
|
||||
} else {
|
||||
_x = (this.Bounds.L * _width / 1000);
|
||||
}
|
||||
if (-1 != this.Bounds.AbsW) {
|
||||
_r = _x + this.Bounds.AbsW;
|
||||
} else {
|
||||
if (this.Bounds.isAbsR) {
|
||||
_r = (_width - this.Bounds.R);
|
||||
} else {
|
||||
_r = this.Bounds.R * _width / 1000;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (g_anchor_right == hor_anchor) {
|
||||
if (this.Bounds.isAbsR) {
|
||||
_r = (_width - this.Bounds.R);
|
||||
} else {
|
||||
_r = (this.Bounds.R * _width / 1000);
|
||||
}
|
||||
if (-1 != this.Bounds.AbsW) {
|
||||
_x = _r - this.Bounds.AbsW;
|
||||
} else {
|
||||
if (this.Bounds.isAbsL) {
|
||||
_x = this.Bounds.L;
|
||||
} else {
|
||||
_x = this.Bounds.L * _width / 1000;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ((g_anchor_left | g_anchor_right) == hor_anchor) {
|
||||
if (this.Bounds.isAbsL) {
|
||||
_x = this.Bounds.L;
|
||||
} else {
|
||||
_x = (this.Bounds.L * _width / 1000);
|
||||
}
|
||||
if (this.Bounds.isAbsR) {
|
||||
_r = (_width - this.Bounds.R);
|
||||
} else {
|
||||
_r = (this.Bounds.R * _width / 1000);
|
||||
}
|
||||
} else {
|
||||
_x = this.Bounds.L;
|
||||
_r = this.Bounds.R;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (g_anchor_top == ver_anchor) {
|
||||
if (this.Bounds.isAbsT) {
|
||||
_y = this.Bounds.T;
|
||||
} else {
|
||||
_y = (this.Bounds.T * _height / 1000);
|
||||
}
|
||||
if (-1 != this.Bounds.AbsH) {
|
||||
_b = _y + this.Bounds.AbsH;
|
||||
} else {
|
||||
if (this.Bounds.isAbsB) {
|
||||
_b = (_height - this.Bounds.B);
|
||||
} else {
|
||||
_b = this.Bounds.B * _height / 1000;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (g_anchor_bottom == ver_anchor) {
|
||||
if (this.Bounds.isAbsB) {
|
||||
_b = (_height - this.Bounds.B);
|
||||
} else {
|
||||
_b = (this.Bounds.B * _height / 1000);
|
||||
}
|
||||
if (-1 != this.Bounds.AbsH) {
|
||||
_y = _b - this.Bounds.AbsH;
|
||||
} else {
|
||||
if (this.Bounds.isAbsT) {
|
||||
_y = this.Bounds.T;
|
||||
} else {
|
||||
_y = this.Bounds.T * _height / 1000;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ((g_anchor_top | g_anchor_bottom) == ver_anchor) {
|
||||
if (this.Bounds.isAbsT) {
|
||||
_y = this.Bounds.T;
|
||||
} else {
|
||||
_y = (this.Bounds.T * _height / 1000);
|
||||
}
|
||||
if (this.Bounds.isAbsB) {
|
||||
_b = (_height - this.Bounds.B);
|
||||
} else {
|
||||
_b = (this.Bounds.B * _height / 1000);
|
||||
}
|
||||
} else {
|
||||
_y = this.Bounds.T;
|
||||
_b = this.Bounds.B;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (_r < _x) {
|
||||
_r = _x;
|
||||
}
|
||||
if (_b < _y) {
|
||||
_b = _y;
|
||||
}
|
||||
this.AbsolutePosition.L = _x;
|
||||
this.AbsolutePosition.T = _y;
|
||||
this.AbsolutePosition.R = _r;
|
||||
this.AbsolutePosition.B = _b;
|
||||
this.HtmlElement.style.left = ((_x * g_dKoef_mm_to_pix + 0.5) >> 0) + "px";
|
||||
this.HtmlElement.style.top = ((_y * g_dKoef_mm_to_pix + 0.5) >> 0) + "px";
|
||||
this.HtmlElement.style.width = (((_r - _x) * g_dKoef_mm_to_pix + 0.5) >> 0) + "px";
|
||||
this.HtmlElement.style.height = (((_b - _y) * g_dKoef_mm_to_pix + 0.5) >> 0) + "px";
|
||||
var lCount = this.Controls.length;
|
||||
for (var i = 0; i < lCount; i++) {
|
||||
this.Controls[i].Resize(_r - _x, _b - _y, api);
|
||||
}
|
||||
};
|
||||
}
|
||||
function CreateControlContainer(name) {
|
||||
var ctrl = new CControlContainer();
|
||||
ctrl.Name = name;
|
||||
ctrl.HtmlElement = document.getElementById(name);
|
||||
return ctrl;
|
||||
}
|
||||
function CreateControl(name) {
|
||||
var ctrl = new CControl();
|
||||
ctrl.Name = name;
|
||||
ctrl.HtmlElement = document.getElementById(name);
|
||||
return ctrl;
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2015
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
"use strict";
|
||||
function CBounds() {
|
||||
this.L = 0;
|
||||
this.T = 0;
|
||||
this.R = 0;
|
||||
this.B = 0;
|
||||
this.isAbsL = false;
|
||||
this.isAbsT = false;
|
||||
this.isAbsR = false;
|
||||
this.isAbsB = false;
|
||||
this.AbsW = -1;
|
||||
this.AbsH = -1;
|
||||
this.SetParams = function (_l, _t, _r, _b, abs_l, abs_t, abs_r, abs_b, absW, absH) {
|
||||
this.L = _l;
|
||||
this.T = _t;
|
||||
this.R = _r;
|
||||
this.B = _b;
|
||||
this.isAbsL = abs_l;
|
||||
this.isAbsT = abs_t;
|
||||
this.isAbsR = abs_r;
|
||||
this.isAbsB = abs_b;
|
||||
this.AbsW = absW;
|
||||
this.AbsH = absH;
|
||||
};
|
||||
}
|
||||
function CAbsolutePosition() {
|
||||
this.L = 0;
|
||||
this.T = 0;
|
||||
this.R = 0;
|
||||
this.B = 0;
|
||||
}
|
||||
var g_anchor_left = 1;
|
||||
var g_anchor_top = 2;
|
||||
var g_anchor_right = 4;
|
||||
var g_anchor_bottom = 8;
|
||||
function CControl() {
|
||||
this.Bounds = new CBounds();
|
||||
this.Anchor = g_anchor_left | g_anchor_top;
|
||||
this.Name = null;
|
||||
this.Parent = null;
|
||||
this.TabIndex = null;
|
||||
this.HtmlElement = null;
|
||||
this.AbsolutePosition = new CBounds();
|
||||
this.Resize = function (_width, _height, api) {
|
||||
if ((null == this.Parent) || (null == this.HtmlElement)) {
|
||||
return;
|
||||
}
|
||||
var _x = 0;
|
||||
var _y = 0;
|
||||
var _r = 0;
|
||||
var _b = 0;
|
||||
var hor_anchor = (this.Anchor & 5);
|
||||
var ver_anchor = (this.Anchor & 10);
|
||||
if (g_anchor_left == hor_anchor) {
|
||||
if (this.Bounds.isAbsL) {
|
||||
_x = this.Bounds.L;
|
||||
} else {
|
||||
_x = (this.Bounds.L * _width / 1000);
|
||||
}
|
||||
if (-1 != this.Bounds.AbsW) {
|
||||
_r = _x + this.Bounds.AbsW;
|
||||
} else {
|
||||
if (this.Bounds.isAbsR) {
|
||||
_r = (_width - this.Bounds.R);
|
||||
} else {
|
||||
_r = this.Bounds.R * _width / 1000;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (g_anchor_right == hor_anchor) {
|
||||
if (this.Bounds.isAbsR) {
|
||||
_r = (_width - this.Bounds.R);
|
||||
} else {
|
||||
_r = (this.Bounds.R * _width / 1000);
|
||||
}
|
||||
if (-1 != this.Bounds.AbsW) {
|
||||
_x = _r - this.Bounds.AbsW;
|
||||
} else {
|
||||
if (this.Bounds.isAbsL) {
|
||||
_x = this.Bounds.L;
|
||||
} else {
|
||||
_x = this.Bounds.L * _width / 1000;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ((g_anchor_left | g_anchor_right) == hor_anchor) {
|
||||
if (this.Bounds.isAbsL) {
|
||||
_x = this.Bounds.L;
|
||||
} else {
|
||||
_x = (this.Bounds.L * _width / 1000);
|
||||
}
|
||||
if (this.Bounds.isAbsR) {
|
||||
_r = (_width - this.Bounds.R);
|
||||
} else {
|
||||
_r = (this.Bounds.R * _width / 1000);
|
||||
}
|
||||
} else {
|
||||
_x = this.Bounds.L;
|
||||
_r = this.Bounds.R;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (g_anchor_top == ver_anchor) {
|
||||
if (this.Bounds.isAbsT) {
|
||||
_y = this.Bounds.T;
|
||||
} else {
|
||||
_y = (this.Bounds.T * _height / 1000);
|
||||
}
|
||||
if (-1 != this.Bounds.AbsH) {
|
||||
_b = _y + this.Bounds.AbsH;
|
||||
} else {
|
||||
if (this.Bounds.isAbsB) {
|
||||
_b = (_height - this.Bounds.B);
|
||||
} else {
|
||||
_b = this.Bounds.B * _height / 1000;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (g_anchor_bottom == ver_anchor) {
|
||||
if (this.Bounds.isAbsB) {
|
||||
_b = (_height - this.Bounds.B);
|
||||
} else {
|
||||
_b = (this.Bounds.B * _height / 1000);
|
||||
}
|
||||
if (-1 != this.Bounds.AbsH) {
|
||||
_y = _b - this.Bounds.AbsH;
|
||||
} else {
|
||||
if (this.Bounds.isAbsT) {
|
||||
_y = this.Bounds.T;
|
||||
} else {
|
||||
_y = this.Bounds.T * _height / 1000;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ((g_anchor_top | g_anchor_bottom) == ver_anchor) {
|
||||
if (this.Bounds.isAbsT) {
|
||||
_y = this.Bounds.T;
|
||||
} else {
|
||||
_y = (this.Bounds.T * _height / 1000);
|
||||
}
|
||||
if (this.Bounds.isAbsB) {
|
||||
_b = (_height - this.Bounds.B);
|
||||
} else {
|
||||
_b = (this.Bounds.B * _height / 1000);
|
||||
}
|
||||
} else {
|
||||
_y = this.Bounds.T;
|
||||
_b = this.Bounds.B;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (_r < _x) {
|
||||
_r = _x;
|
||||
}
|
||||
if (_b < _y) {
|
||||
_b = _y;
|
||||
}
|
||||
this.AbsolutePosition.L = _x;
|
||||
this.AbsolutePosition.T = _y;
|
||||
this.AbsolutePosition.R = _r;
|
||||
this.AbsolutePosition.B = _b;
|
||||
this.HtmlElement.style.left = ((_x * g_dKoef_mm_to_pix + 0.5) >> 0) + "px";
|
||||
this.HtmlElement.style.top = ((_y * g_dKoef_mm_to_pix + 0.5) >> 0) + "px";
|
||||
this.HtmlElement.style.width = (((_r - _x) * g_dKoef_mm_to_pix + 0.5) >> 0) + "px";
|
||||
this.HtmlElement.style.height = (((_b - _y) * g_dKoef_mm_to_pix + 0.5) >> 0) + "px";
|
||||
if (api !== undefined && api.CheckRetinaElement && api.CheckRetinaElement(this.HtmlElement)) {
|
||||
var _W = ((_r - _x) * g_dKoef_mm_to_pix + 0.5) >> 0;
|
||||
var _H = ((_b - _y) * g_dKoef_mm_to_pix + 0.5) >> 0;
|
||||
this.HtmlElement.width = _W << 1;
|
||||
this.HtmlElement.height = _H << 1;
|
||||
} else {
|
||||
this.HtmlElement.width = ((_r - _x) * g_dKoef_mm_to_pix + 0.5) >> 0;
|
||||
this.HtmlElement.height = ((_b - _y) * g_dKoef_mm_to_pix + 0.5) >> 0;
|
||||
}
|
||||
};
|
||||
this.GetCSS_width = function () {
|
||||
return ((this.AbsolutePosition.R - this.AbsolutePosition.L) * g_dKoef_mm_to_pix + 0.5) >> 0;
|
||||
};
|
||||
this.GetCSS_height = function () {
|
||||
return ((this.AbsolutePosition.B - this.AbsolutePosition.T) * g_dKoef_mm_to_pix + 0.5) >> 0;
|
||||
};
|
||||
}
|
||||
function CControlContainer() {
|
||||
this.Bounds = new CBounds();
|
||||
this.Anchor = g_anchor_left | g_anchor_top;
|
||||
this.Name = null;
|
||||
this.Parent = null;
|
||||
this.TabIndex = null;
|
||||
this.HtmlElement = null;
|
||||
this.AbsolutePosition = new CBounds();
|
||||
this.Controls = [];
|
||||
this.AddControl = function (ctrl) {
|
||||
ctrl.Parent = this;
|
||||
this.Controls[this.Controls.length] = ctrl;
|
||||
};
|
||||
this.Resize = function (_width, _height, api) {
|
||||
if (null == this.Parent) {
|
||||
this.AbsolutePosition.L = 0;
|
||||
this.AbsolutePosition.T = 0;
|
||||
this.AbsolutePosition.R = _width;
|
||||
this.AbsolutePosition.B = _height;
|
||||
if (null != this.HtmlElement) {
|
||||
var lCount = this.Controls.length;
|
||||
for (var i = 0; i < lCount; i++) {
|
||||
this.Controls[i].Resize(_width, _height, api);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
var _x = 0;
|
||||
var _y = 0;
|
||||
var _r = 0;
|
||||
var _b = 0;
|
||||
var hor_anchor = (this.Anchor & 5);
|
||||
var ver_anchor = (this.Anchor & 10);
|
||||
if (g_anchor_left == hor_anchor) {
|
||||
if (this.Bounds.isAbsL) {
|
||||
_x = this.Bounds.L;
|
||||
} else {
|
||||
_x = (this.Bounds.L * _width / 1000);
|
||||
}
|
||||
if (-1 != this.Bounds.AbsW) {
|
||||
_r = _x + this.Bounds.AbsW;
|
||||
} else {
|
||||
if (this.Bounds.isAbsR) {
|
||||
_r = (_width - this.Bounds.R);
|
||||
} else {
|
||||
_r = this.Bounds.R * _width / 1000;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (g_anchor_right == hor_anchor) {
|
||||
if (this.Bounds.isAbsR) {
|
||||
_r = (_width - this.Bounds.R);
|
||||
} else {
|
||||
_r = (this.Bounds.R * _width / 1000);
|
||||
}
|
||||
if (-1 != this.Bounds.AbsW) {
|
||||
_x = _r - this.Bounds.AbsW;
|
||||
} else {
|
||||
if (this.Bounds.isAbsL) {
|
||||
_x = this.Bounds.L;
|
||||
} else {
|
||||
_x = this.Bounds.L * _width / 1000;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ((g_anchor_left | g_anchor_right) == hor_anchor) {
|
||||
if (this.Bounds.isAbsL) {
|
||||
_x = this.Bounds.L;
|
||||
} else {
|
||||
_x = (this.Bounds.L * _width / 1000);
|
||||
}
|
||||
if (this.Bounds.isAbsR) {
|
||||
_r = (_width - this.Bounds.R);
|
||||
} else {
|
||||
_r = (this.Bounds.R * _width / 1000);
|
||||
}
|
||||
} else {
|
||||
_x = this.Bounds.L;
|
||||
_r = this.Bounds.R;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (g_anchor_top == ver_anchor) {
|
||||
if (this.Bounds.isAbsT) {
|
||||
_y = this.Bounds.T;
|
||||
} else {
|
||||
_y = (this.Bounds.T * _height / 1000);
|
||||
}
|
||||
if (-1 != this.Bounds.AbsH) {
|
||||
_b = _y + this.Bounds.AbsH;
|
||||
} else {
|
||||
if (this.Bounds.isAbsB) {
|
||||
_b = (_height - this.Bounds.B);
|
||||
} else {
|
||||
_b = this.Bounds.B * _height / 1000;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (g_anchor_bottom == ver_anchor) {
|
||||
if (this.Bounds.isAbsB) {
|
||||
_b = (_height - this.Bounds.B);
|
||||
} else {
|
||||
_b = (this.Bounds.B * _height / 1000);
|
||||
}
|
||||
if (-1 != this.Bounds.AbsH) {
|
||||
_y = _b - this.Bounds.AbsH;
|
||||
} else {
|
||||
if (this.Bounds.isAbsT) {
|
||||
_y = this.Bounds.T;
|
||||
} else {
|
||||
_y = this.Bounds.T * _height / 1000;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ((g_anchor_top | g_anchor_bottom) == ver_anchor) {
|
||||
if (this.Bounds.isAbsT) {
|
||||
_y = this.Bounds.T;
|
||||
} else {
|
||||
_y = (this.Bounds.T * _height / 1000);
|
||||
}
|
||||
if (this.Bounds.isAbsB) {
|
||||
_b = (_height - this.Bounds.B);
|
||||
} else {
|
||||
_b = (this.Bounds.B * _height / 1000);
|
||||
}
|
||||
} else {
|
||||
_y = this.Bounds.T;
|
||||
_b = this.Bounds.B;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (_r < _x) {
|
||||
_r = _x;
|
||||
}
|
||||
if (_b < _y) {
|
||||
_b = _y;
|
||||
}
|
||||
this.AbsolutePosition.L = _x;
|
||||
this.AbsolutePosition.T = _y;
|
||||
this.AbsolutePosition.R = _r;
|
||||
this.AbsolutePosition.B = _b;
|
||||
this.HtmlElement.style.left = ((_x * g_dKoef_mm_to_pix + 0.5) >> 0) + "px";
|
||||
this.HtmlElement.style.top = ((_y * g_dKoef_mm_to_pix + 0.5) >> 0) + "px";
|
||||
this.HtmlElement.style.width = (((_r - _x) * g_dKoef_mm_to_pix + 0.5) >> 0) + "px";
|
||||
this.HtmlElement.style.height = (((_b - _y) * g_dKoef_mm_to_pix + 0.5) >> 0) + "px";
|
||||
var lCount = this.Controls.length;
|
||||
for (var i = 0; i < lCount; i++) {
|
||||
this.Controls[i].Resize(_r - _x, _b - _y, api);
|
||||
}
|
||||
};
|
||||
this.GetCSS_width = function () {
|
||||
return ((this.AbsolutePosition.R - this.AbsolutePosition.L) * g_dKoef_mm_to_pix + 0.5) >> 0;
|
||||
};
|
||||
this.GetCSS_height = function () {
|
||||
return ((this.AbsolutePosition.B - this.AbsolutePosition.T) * g_dKoef_mm_to_pix + 0.5) >> 0;
|
||||
};
|
||||
}
|
||||
function CreateControlContainer(name) {
|
||||
var ctrl = new CControlContainer();
|
||||
ctrl.Name = name;
|
||||
ctrl.HtmlElement = document.getElementById(name);
|
||||
return ctrl;
|
||||
}
|
||||
function CreateControl(name) {
|
||||
var ctrl = new CControl();
|
||||
ctrl.Name = name;
|
||||
ctrl.HtmlElement = document.getElementById(name);
|
||||
return ctrl;
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,76 +1,77 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
function scrollUpHover(elem) {
|
||||
elem.style.backgroundPosition = "0px -19px";
|
||||
}
|
||||
function scrollUpOut(elem) {
|
||||
elem.style.backgroundPosition = "0px 0px";
|
||||
}
|
||||
function scrollUpDown(elem) {
|
||||
elem.style.backgroundPosition = "0px -38px";
|
||||
}
|
||||
function scrollDownHover(elem) {
|
||||
elem.style.backgroundPosition = "0px -19px";
|
||||
}
|
||||
function scrollDownOut(elem) {
|
||||
elem.style.backgroundPosition = "0px -38px";
|
||||
}
|
||||
function scrollDownDown(elem) {
|
||||
elem.style.backgroundPosition = "0px 0px";
|
||||
}
|
||||
function scrollLeftHover(elem) {
|
||||
elem.style.backgroundPosition = "-19px 0px";
|
||||
}
|
||||
function scrollLeftOut(elem) {
|
||||
elem.style.backgroundPosition = "0px 0px";
|
||||
}
|
||||
function scrollLeftDown(elem) {
|
||||
elem.style.backgroundPosition = "-38px 0px";
|
||||
}
|
||||
function scrollRightHover(elem) {
|
||||
elem.style.backgroundPosition = "-19px 0px";
|
||||
}
|
||||
function scrollRightOut(elem) {
|
||||
elem.style.backgroundPosition = "-38px 0px";
|
||||
}
|
||||
function scrollRightDown(elem) {
|
||||
elem.style.backgroundPosition = "0px 0px";
|
||||
}
|
||||
function scrollDragHover(elem) {
|
||||
elem.style.backgroundColor = "#DDDDDD";
|
||||
}
|
||||
function scrollDragOut(elem) {
|
||||
elem.style.backgroundColor = "#D3D3D3";
|
||||
}
|
||||
function scrollDragDown(elem) {
|
||||
elem.style.backgroundColor = "#CCCCCC";
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2015
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
"use strict";
|
||||
function scrollUpHover(elem) {
|
||||
elem.style.backgroundPosition = "0px -19px";
|
||||
}
|
||||
function scrollUpOut(elem) {
|
||||
elem.style.backgroundPosition = "0px 0px";
|
||||
}
|
||||
function scrollUpDown(elem) {
|
||||
elem.style.backgroundPosition = "0px -38px";
|
||||
}
|
||||
function scrollDownHover(elem) {
|
||||
elem.style.backgroundPosition = "0px -19px";
|
||||
}
|
||||
function scrollDownOut(elem) {
|
||||
elem.style.backgroundPosition = "0px -38px";
|
||||
}
|
||||
function scrollDownDown(elem) {
|
||||
elem.style.backgroundPosition = "0px 0px";
|
||||
}
|
||||
function scrollLeftHover(elem) {
|
||||
elem.style.backgroundPosition = "-19px 0px";
|
||||
}
|
||||
function scrollLeftOut(elem) {
|
||||
elem.style.backgroundPosition = "0px 0px";
|
||||
}
|
||||
function scrollLeftDown(elem) {
|
||||
elem.style.backgroundPosition = "-38px 0px";
|
||||
}
|
||||
function scrollRightHover(elem) {
|
||||
elem.style.backgroundPosition = "-19px 0px";
|
||||
}
|
||||
function scrollRightOut(elem) {
|
||||
elem.style.backgroundPosition = "-38px 0px";
|
||||
}
|
||||
function scrollRightDown(elem) {
|
||||
elem.style.backgroundPosition = "0px 0px";
|
||||
}
|
||||
function scrollDragHover(elem) {
|
||||
elem.style.backgroundColor = "#DDDDDD";
|
||||
}
|
||||
function scrollDragOut(elem) {
|
||||
elem.style.backgroundColor = "#D3D3D3";
|
||||
}
|
||||
function scrollDragDown(elem) {
|
||||
elem.style.backgroundColor = "#CCCCCC";
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -1,88 +1,100 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
function HitInLine(context, px, py, x0, y0, x1, y1) {
|
||||
var tx, ty, dx, dy, d;
|
||||
tx = x1 - x0;
|
||||
ty = y1 - y0;
|
||||
d = 1.5 / Math.sqrt(tx * tx + ty * ty);
|
||||
if (global_mouseEvent !== null && typeof global_mouseEvent === "object" && typeof global_mouseEvent.KoefPixToMM === "number" && !isNaN(global_mouseEvent.KoefPixToMM)) {
|
||||
d *= global_mouseEvent.KoefPixToMM;
|
||||
}
|
||||
dx = -ty * d;
|
||||
dy = tx * d;
|
||||
context.beginPath();
|
||||
context.moveTo(x0, y0);
|
||||
context.lineTo(x0 + dx, y0 + dy);
|
||||
context.lineTo(x1 + dx, y1 + dy);
|
||||
context.lineTo(x1 - dx, y1 - dy);
|
||||
context.lineTo(x0 - dx, y0 - dy);
|
||||
context.closePath();
|
||||
return context.isPointInPath(px, py);
|
||||
}
|
||||
function HitInBezier4(context, px, py, x0, y0, x1, y1, x2, y2, x3, y3) {
|
||||
var tx, ty, dx, dy, d;
|
||||
tx = x3 - x0;
|
||||
ty = y3 - y0;
|
||||
d = 1.5 / Math.sqrt(tx * tx + ty * ty);
|
||||
if (global_mouseEvent !== null && typeof global_mouseEvent === "object" && typeof global_mouseEvent.KoefPixToMM === "number" && !isNaN(global_mouseEvent.KoefPixToMM)) {
|
||||
d *= global_mouseEvent.KoefPixToMM;
|
||||
}
|
||||
dx = -ty * d;
|
||||
dy = tx * d;
|
||||
context.beginPath();
|
||||
context.moveTo(x0, y0);
|
||||
context.lineTo(x0 + dx, y0 + dy);
|
||||
context.bezierCurveTo(x1 + dx, y1 + dy, x2 + dx, y2 + dy, x3 + dx, y3 + dy);
|
||||
context.lineTo(x3 - dx, y3 - dy);
|
||||
context.bezierCurveTo(x2 - dx, y2 - dy, x1 - dx, y1 - dy, x0 - dx, y0 - dy);
|
||||
context.closePath();
|
||||
return context.isPointInPath(px, py);
|
||||
}
|
||||
function HitInBezier3(context, px, py, x0, y0, x1, y1, x2, y2) {
|
||||
var tx, ty, dx, dy, d;
|
||||
tx = x2 - x0;
|
||||
ty = y2 - y0;
|
||||
d = 1.5 / Math.sqrt(tx * tx + ty * ty);
|
||||
if (global_mouseEvent !== null && typeof global_mouseEvent === "object" && typeof global_mouseEvent.KoefPixToMM === "number" && !isNaN(global_mouseEvent.KoefPixToMM)) {
|
||||
d *= global_mouseEvent.KoefPixToMM;
|
||||
}
|
||||
dx = -ty * d;
|
||||
dy = tx * d;
|
||||
context.beginPath();
|
||||
context.moveTo(x0, y0);
|
||||
context.lineTo(x0 + dx, y0 + dy);
|
||||
context.quadraticCurveTo(x1 + dx, y1 + dy, x2 + dx, y2 + dy);
|
||||
context.lineTo(x2 - dx, y2 - dy);
|
||||
context.quadraticCurveTo(x1 - dx, y1 - dy, x0 - dx, y0 - dy);
|
||||
context.closePath();
|
||||
return context.isPointInPath(px, py);
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2015
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
"use strict";
|
||||
var double_eps = 1e-05;
|
||||
var hit_error_eps = 0.5;
|
||||
function HitInLine(context, px, py, x0, y0, x1, y1) {
|
||||
var tx, ty, dx, dy, d;
|
||||
tx = x1 - x0;
|
||||
ty = y1 - y0;
|
||||
if (Math.abs(tx * tx + ty * ty) < double_eps) {
|
||||
return HitInLine(context, px, py, x0, y0, x1 + hit_error_eps, y1 + hit_error_eps);
|
||||
}
|
||||
d = 1.5 / Math.sqrt(tx * tx + ty * ty);
|
||||
if (global_mouseEvent !== null && typeof global_mouseEvent === "object" && typeof global_mouseEvent.KoefPixToMM === "number" && !isNaN(global_mouseEvent.KoefPixToMM)) {
|
||||
d *= global_mouseEvent.KoefPixToMM;
|
||||
}
|
||||
dx = -ty * d;
|
||||
dy = tx * d;
|
||||
context.beginPath();
|
||||
context.moveTo(x0, y0);
|
||||
context.lineTo(x0 + dx, y0 + dy);
|
||||
context.lineTo(x1 + dx, y1 + dy);
|
||||
context.lineTo(x1 - dx, y1 - dy);
|
||||
context.lineTo(x0 - dx, y0 - dy);
|
||||
context.closePath();
|
||||
return context.isPointInPath(px, py);
|
||||
}
|
||||
function HitInBezier4(context, px, py, x0, y0, x1, y1, x2, y2, x3, y3) {
|
||||
var tx, ty, dx, dy, d;
|
||||
tx = x3 - x0;
|
||||
ty = y3 - y0;
|
||||
if (Math.abs(tx * tx + ty * ty) < double_eps) {
|
||||
return HitInLine(context, px, py, x0, y0, x1, y1, x2, y2, x3 + hit_error_eps, y3 + hit_error_eps);
|
||||
}
|
||||
d = 1.5 / Math.sqrt(tx * tx + ty * ty);
|
||||
if (global_mouseEvent !== null && typeof global_mouseEvent === "object" && typeof global_mouseEvent.KoefPixToMM === "number" && !isNaN(global_mouseEvent.KoefPixToMM)) {
|
||||
d *= global_mouseEvent.KoefPixToMM;
|
||||
}
|
||||
dx = -ty * d;
|
||||
dy = tx * d;
|
||||
context.beginPath();
|
||||
context.moveTo(x0, y0);
|
||||
context.lineTo(x0 + dx, y0 + dy);
|
||||
context.bezierCurveTo(x1 + dx, y1 + dy, x2 + dx, y2 + dy, x3 + dx, y3 + dy);
|
||||
context.lineTo(x3 - dx, y3 - dy);
|
||||
context.bezierCurveTo(x2 - dx, y2 - dy, x1 - dx, y1 - dy, x0 - dx, y0 - dy);
|
||||
context.closePath();
|
||||
return context.isPointInPath(px, py);
|
||||
}
|
||||
function HitInBezier3(context, px, py, x0, y0, x1, y1, x2, y2) {
|
||||
var tx, ty, dx, dy, d;
|
||||
tx = x2 - x0;
|
||||
ty = y2 - y0;
|
||||
if (Math.abs(tx * tx + ty * ty) < double_eps) {
|
||||
return HitInLine(context, px, py, x0, y0, x1, y1, x2 + hit_error_eps, y2 + hit_error_eps);
|
||||
}
|
||||
d = 1.5 / Math.sqrt(tx * tx + ty * ty);
|
||||
if (global_mouseEvent !== null && typeof global_mouseEvent === "object" && typeof global_mouseEvent.KoefPixToMM === "number" && !isNaN(global_mouseEvent.KoefPixToMM)) {
|
||||
d *= global_mouseEvent.KoefPixToMM;
|
||||
}
|
||||
dx = -ty * d;
|
||||
dy = tx * d;
|
||||
context.beginPath();
|
||||
context.moveTo(x0, y0);
|
||||
context.lineTo(x0 + dx, y0 + dy);
|
||||
context.quadraticCurveTo(x1 + dx, y1 + dy, x2 + dx, y2 + dy);
|
||||
context.lineTo(x2 - dx, y2 - dy);
|
||||
context.quadraticCurveTo(x1 - dx, y1 - dy, x0 - dx, y0 - dy);
|
||||
context.closePath();
|
||||
return context.isPointInPath(px, py);
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
185
OfficeWeb/sdk/Word/Drawing/Private/Graphics.js
Normal file
185
OfficeWeb/sdk/Word/Drawing/Private/Graphics.js
Normal file
@@ -0,0 +1,185 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2015
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
"use strict";
|
||||
CGraphics.prototype.DrawLockParagraph = function (lock_type, x, y1, y2) {
|
||||
if (lock_type == locktype_None || editor.WordControl.m_oDrawingDocument.IsLockObjectsEnable === false || editor.isViewMode) {
|
||||
return;
|
||||
}
|
||||
if (lock_type == locktype_Mine) {
|
||||
this.p_color(22, 156, 0, 255);
|
||||
} else {
|
||||
this.p_color(238, 53, 37, 255);
|
||||
}
|
||||
var _x = this.m_oFullTransform.TransformPointX(x, y1) >> 0;
|
||||
var _xT = this.m_oFullTransform.TransformPointX(x, y2) >> 0;
|
||||
var _y1 = (this.m_oFullTransform.TransformPointY(x, y1) >> 0) + 0.5;
|
||||
var _y2 = (this.m_oFullTransform.TransformPointY(x, y2) >> 0) - 1.5;
|
||||
var ctx = this.m_oContext;
|
||||
if (_x != _xT) {
|
||||
var dKoefMMToPx = 1 / Math.max(this.m_oCoordTransform.sx, 0.001);
|
||||
this.p_width(1000 * dKoefMMToPx);
|
||||
var w_dot = 2 * dKoefMMToPx;
|
||||
var w_dist = 1 * dKoefMMToPx;
|
||||
var w_len_indent = 3;
|
||||
var _interf = editor.WordControl.m_oDrawingDocument.AutoShapesTrack;
|
||||
this._s();
|
||||
_interf.AddLineDash(ctx, x, y1, x, y2, w_dot, w_dist);
|
||||
_interf.AddLineDash(ctx, x, y1, x + w_len_indent, y1, w_dot, w_dist);
|
||||
_interf.AddLineDash(ctx, x, y2, x + w_len_indent, y2, w_dot, w_dist);
|
||||
this.ds();
|
||||
return;
|
||||
}
|
||||
var bIsInt = this.m_bIntegerGrid;
|
||||
if (!bIsInt) {
|
||||
this.SetIntegerGrid(true);
|
||||
}
|
||||
ctx.lineWidth = 1;
|
||||
var w_dot = 2;
|
||||
var w_dist = 1;
|
||||
var w_len_indent = (3 * this.m_oCoordTransform.sx) >> 0;
|
||||
this._s();
|
||||
var y_mem = _y1 - 0.5;
|
||||
while (true) {
|
||||
if ((y_mem + w_dot) > _y2) {
|
||||
break;
|
||||
}
|
||||
ctx.moveTo(_x + 0.5, y_mem);
|
||||
y_mem += w_dot;
|
||||
ctx.lineTo(_x + 0.5, y_mem);
|
||||
y_mem += w_dist;
|
||||
}
|
||||
var x_max = _x + w_len_indent;
|
||||
var x_mem = _x;
|
||||
while (true) {
|
||||
if (x_mem > x_max) {
|
||||
break;
|
||||
}
|
||||
ctx.moveTo(x_mem, _y1);
|
||||
x_mem += w_dot;
|
||||
ctx.lineTo(x_mem, _y1);
|
||||
x_mem += w_dist;
|
||||
}
|
||||
x_mem = _x;
|
||||
while (true) {
|
||||
if (x_mem > x_max) {
|
||||
break;
|
||||
}
|
||||
ctx.moveTo(x_mem, _y2);
|
||||
x_mem += w_dot;
|
||||
ctx.lineTo(x_mem, _y2);
|
||||
x_mem += w_dist;
|
||||
}
|
||||
this.ds();
|
||||
if (!bIsInt) {
|
||||
this.SetIntegerGrid(false);
|
||||
}
|
||||
};
|
||||
CGraphics.prototype.DrawLockObjectRect = function (lock_type, x, y, w, h) {
|
||||
if (editor.isViewMode || this.IsThumbnail || lock_type == locktype_None) {
|
||||
return;
|
||||
}
|
||||
if (editor.WordControl.m_oDrawingDocument.IsLockObjectsEnable === false && lock_type == locktype_Mine) {
|
||||
return;
|
||||
}
|
||||
if (lock_type == locktype_Mine) {
|
||||
this.p_color(22, 156, 0, 255);
|
||||
} else {
|
||||
this.p_color(238, 53, 37, 255);
|
||||
}
|
||||
var ctx = this.m_oContext;
|
||||
var _m = this.m_oTransform;
|
||||
if (_m.sx != 1 || _m.shx != 0 || _m.shy != 0 || _m.sy != 1) {
|
||||
var dKoefMMToPx = 1 / Math.max(this.m_oCoordTransform.sx, 0.001);
|
||||
this.p_width(1000 * dKoefMMToPx);
|
||||
var w_dot = 2 * dKoefMMToPx;
|
||||
var w_dist = 1 * dKoefMMToPx;
|
||||
var _interf = editor.WordControl.m_oDrawingDocument.AutoShapesTrack;
|
||||
var eps = 5 * dKoefMMToPx;
|
||||
var _x = x - eps;
|
||||
var _y = y - eps;
|
||||
var _r = x + w + eps;
|
||||
var _b = y + h + eps;
|
||||
this._s();
|
||||
_interf.AddRectDash(ctx, _x, _y, _r, _y, _x, _b, _r, _b, w_dot, w_dist, true);
|
||||
this._s();
|
||||
return;
|
||||
}
|
||||
var bIsInt = this.m_bIntegerGrid;
|
||||
if (!bIsInt) {
|
||||
this.SetIntegerGrid(true);
|
||||
}
|
||||
ctx.lineWidth = 1;
|
||||
var w_dot = 2;
|
||||
var w_dist = 2;
|
||||
var eps = 5;
|
||||
var _x = (this.m_oFullTransform.TransformPointX(x, y) >> 0) - eps + 0.5;
|
||||
var _y = (this.m_oFullTransform.TransformPointY(x, y) >> 0) - eps + 0.5;
|
||||
var _r = (this.m_oFullTransform.TransformPointX(x + w, y + h) >> 0) + eps + 0.5;
|
||||
var _b = (this.m_oFullTransform.TransformPointY(x + w, y + h) >> 0) + eps + 0.5;
|
||||
this._s();
|
||||
for (var i = _x; i < _r; i += w_dist) {
|
||||
ctx.moveTo(i, _y);
|
||||
i += w_dot;
|
||||
if (i > _r) {
|
||||
i = _r;
|
||||
}
|
||||
ctx.lineTo(i, _y);
|
||||
}
|
||||
for (var i = _y; i < _b; i += w_dist) {
|
||||
ctx.moveTo(_r, i);
|
||||
i += w_dot;
|
||||
if (i > _b) {
|
||||
i = _b;
|
||||
}
|
||||
ctx.lineTo(_r, i);
|
||||
}
|
||||
for (var i = _r; i > _x; i -= w_dist) {
|
||||
ctx.moveTo(i, _b);
|
||||
i -= w_dot;
|
||||
if (i < _x) {
|
||||
i = _x;
|
||||
}
|
||||
ctx.lineTo(i, _b);
|
||||
}
|
||||
for (var i = _b; i > _y; i -= w_dist) {
|
||||
ctx.moveTo(_x, i);
|
||||
i -= w_dot;
|
||||
if (i < _y) {
|
||||
i = _y;
|
||||
}
|
||||
ctx.lineTo(_x, i);
|
||||
}
|
||||
this.ds();
|
||||
if (!bIsInt) {
|
||||
this.SetIntegerGrid(false);
|
||||
}
|
||||
};
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,68 +1,69 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2014
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
var translations_map = {};
|
||||
var styles_index_map = {};
|
||||
styles_index_map["Normal"] = 0;
|
||||
styles_index_map["No list"] = 1;
|
||||
styles_index_map["Heading 1"] = 2;
|
||||
styles_index_map["Heading 2"] = 3;
|
||||
styles_index_map["Heading 3"] = 4;
|
||||
styles_index_map["Heading 4"] = 5;
|
||||
styles_index_map["Heading 5"] = 6;
|
||||
styles_index_map["Heading 6"] = 7;
|
||||
styles_index_map["Heading 7"] = 8;
|
||||
styles_index_map["Heading 8"] = 9;
|
||||
styles_index_map["Heading 9"] = 10;
|
||||
styles_index_map["Paragraph List"] = 11;
|
||||
styles_index_map["Normal Table"] = 12;
|
||||
styles_index_map["No Spacing"] = 13;
|
||||
translations_map["en"] = {};
|
||||
translations_map["en"].DefaultStyles = ["Normal", "No List", "Heading 1", "Heading 2", "Heading 3", "Heading 4", "Heading 5", "Heading 6", "Heading 7", "Heading 8", "Heading 9", "Paragraph List", "Normal Table", "No Spacing"];
|
||||
translations_map["en"].StylesText = "AaBbCcDdEeFf";
|
||||
translations_map["ru"] = {};
|
||||
translations_map["ru"].DefaultStyles = ["Обычный", "Нет списка", "Заголовок 1", "Заголовок 2", "Заголовок 3", "Заголовок 4", "Заголовок 5", "Заголовок 6", "Заголовок 7", "Заголовок 8", "Заголовок 9", "Абзац списка", "Обычная таблица", "Без интервала"];
|
||||
translations_map["ru"].StylesText = "АаБбВвГгДдЕе";
|
||||
translations_map["de"] = {};
|
||||
translations_map["de"].DefaultStyles = ["Standard", "Keine Liste", "Überschrift 1", "Überschrift 2", "Überschrift 3", "Überschrift 4", "Überschrift 5", "Überschrift 6", "Überschrift 7", "Überschrift 8", "Überschrift 9", "Listenabsatz", "Normale Tabelle", "Kein Leerraum"];
|
||||
translations_map["de"].StylesText = "AaBbCcDdEeFf";
|
||||
translations_map["fr"] = {};
|
||||
translations_map["fr"].DefaultStyles = ["Normal", "Sans liste", "Titre 1", "Titre 2", "Titre 3", "Titre 4", "Titre 5", "Titre 6", "Titre 7", "Titre 8", "Titre 9", "Paragraphe de liste", "Tableau normal", "Sans interligne"];
|
||||
translations_map["fr"].StylesText = "AaBbCcDdEeFf";
|
||||
translations_map["it"] = {};
|
||||
translations_map["it"].DefaultStyles = ["Normale", "Nessun elenco", "Titolo 1", "Titolo 2", "Titolo 3", "Titolo 4", "Titolo 5", "Titolo 6", "Titolo 7", "Titolo 8", "Titolo 9", "Paragrafo elenco", "Tabella normale", "Nessuna spaziatura"];
|
||||
translations_map["it"].StylesText = "AaBbCcDdEeFf";
|
||||
translations_map["es"] = {};
|
||||
translations_map["es"].DefaultStyles = ["Normal", "No lista", "Título 1", "Título 2", "Título 3", "Título 4", "Título 5", "Título 6", "Título 7", "Título 8", "Título 9", "Lista de párrafos", "Tabla", "Sin espaciado"];
|
||||
translations_map["es"].StylesText = "AaBbCcDdEeFf";
|
||||
translations_map["lv"] = {};
|
||||
translations_map["lv"].DefaultStyles = ["Normāls", "Nav saraksts", "Virsraksts 1", "Virsraksts 2", "Virsraksts 3", "Virsraksts 4", "Virsraksts 5", "Virsraksts 6", "Virsraksts 7", "Virsraksts 8", "Virsraksts 9", "Panta saraksts", "Normāla tabula", "Bez atstarpes"];
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2015
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
"use strict";
|
||||
var translations_map = {};
|
||||
var styles_index_map = {};
|
||||
styles_index_map["Normal"] = 0;
|
||||
styles_index_map["No list"] = 1;
|
||||
styles_index_map["Heading 1"] = 2;
|
||||
styles_index_map["Heading 2"] = 3;
|
||||
styles_index_map["Heading 3"] = 4;
|
||||
styles_index_map["Heading 4"] = 5;
|
||||
styles_index_map["Heading 5"] = 6;
|
||||
styles_index_map["Heading 6"] = 7;
|
||||
styles_index_map["Heading 7"] = 8;
|
||||
styles_index_map["Heading 8"] = 9;
|
||||
styles_index_map["Heading 9"] = 10;
|
||||
styles_index_map["Paragraph List"] = 11;
|
||||
styles_index_map["Normal Table"] = 12;
|
||||
styles_index_map["No Spacing"] = 13;
|
||||
translations_map["en"] = {};
|
||||
translations_map["en"].DefaultStyles = ["Normal", "No List", "Heading 1", "Heading 2", "Heading 3", "Heading 4", "Heading 5", "Heading 6", "Heading 7", "Heading 8", "Heading 9", "Paragraph List", "Normal Table", "No Spacing"];
|
||||
translations_map["en"].StylesText = "AaBbCcDdEeFf";
|
||||
translations_map["ru"] = {};
|
||||
translations_map["ru"].DefaultStyles = ["Обычный", "Нет списка", "Заголовок 1", "Заголовок 2", "Заголовок 3", "Заголовок 4", "Заголовок 5", "Заголовок 6", "Заголовок 7", "Заголовок 8", "Заголовок 9", "Абзац списка", "Обычная таблица", "Без интервала"];
|
||||
translations_map["ru"].StylesText = "АаБбВвГгДдЕе";
|
||||
translations_map["de"] = {};
|
||||
translations_map["de"].DefaultStyles = ["Standard", "Keine Liste", "Überschrift 1", "Überschrift 2", "Überschrift 3", "Überschrift 4", "Überschrift 5", "Überschrift 6", "Überschrift 7", "Überschrift 8", "Überschrift 9", "Listenabsatz", "Normale Tabelle", "Kein Leerraum"];
|
||||
translations_map["de"].StylesText = "AaBbCcDdEeFf";
|
||||
translations_map["fr"] = {};
|
||||
translations_map["fr"].DefaultStyles = ["Normal", "Sans liste", "Titre 1", "Titre 2", "Titre 3", "Titre 4", "Titre 5", "Titre 6", "Titre 7", "Titre 8", "Titre 9", "Paragraphe de liste", "Tableau normal", "Sans interligne"];
|
||||
translations_map["fr"].StylesText = "AaBbCcDdEeFf";
|
||||
translations_map["it"] = {};
|
||||
translations_map["it"].DefaultStyles = ["Normale", "Nessun elenco", "Titolo 1", "Titolo 2", "Titolo 3", "Titolo 4", "Titolo 5", "Titolo 6", "Titolo 7", "Titolo 8", "Titolo 9", "Paragrafo elenco", "Tabella normale", "Nessuna spaziatura"];
|
||||
translations_map["it"].StylesText = "AaBbCcDdEeFf";
|
||||
translations_map["es"] = {};
|
||||
translations_map["es"].DefaultStyles = ["Normal", "No lista", "Título 1", "Título 2", "Título 3", "Título 4", "Título 5", "Título 6", "Título 7", "Título 8", "Título 9", "Lista de párrafos", "Tabla", "Sin espaciado"];
|
||||
translations_map["es"].StylesText = "AaBbCcDdEeFf";
|
||||
translations_map["lv"] = {};
|
||||
translations_map["lv"].DefaultStyles = ["Normāls", "Nav saraksts", "Virsraksts 1", "Virsraksts 2", "Virsraksts 3", "Virsraksts 4", "Virsraksts 5", "Virsraksts 6", "Virsraksts 7", "Virsraksts 8", "Virsraksts 9", "Panta saraksts", "Normāla tabula", "Bez atstarpes"];
|
||||
translations_map["lv"].StylesText = "AaBbCcDdEeFf";
|
||||
Reference in New Issue
Block a user