Commit 3adcc586 authored by Oleg.Korshul's avatar Oleg.Korshul Committed by Alexander.Trofimov

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@50125 954022d7-b5bf-4e40-9824-e11837661b57
parent 060def27
......@@ -11,8 +11,8 @@ var FOCUS_OBJECT_THUMBNAILS = 0;
var FOCUS_OBJECT_MAIN = 1;
var FOCUS_OBJECT_NOTES = 2;
var COMMENT_WIDTH = 24;
var COMMENT_HEIGHT = 22;
var COMMENT_WIDTH = 18;
var COMMENT_HEIGHT = 16;
function CTableMarkup(Table)
{
......@@ -2957,14 +2957,26 @@ function CDrawingDocument()
{
},
this.GetCommentWidth = function()
this.GetCommentWidth = function(type)
{
return COMMENT_WIDTH * g_dKoef_pix_to_mm * 100 / this.m_oWordControl.m_nZoomValue;
var _index = 0;
if ((type & 0x02) == 0x02)
_index = 2;
if ((type & 0x01) == 0x01)
_index += 1;
return g_comment_image_offsets[_index][2] * g_dKoef_pix_to_mm * 100 / this.m_oWordControl.m_nZoomValue;
},
this.GetCommentHeight = function()
this.GetCommentHeight = function(type)
{
return COMMENT_HEIGHT * g_dKoef_pix_to_mm * 100 / this.m_oWordControl.m_nZoomValue;
var _index = 0;
if ((type & 0x02) == 0x02)
_index = 2;
if ((type & 0x01) == 0x01)
_index += 1;
return g_comment_image_offsets[_index][3] * g_dKoef_pix_to_mm * 100 / this.m_oWordControl.m_nZoomValue;
}
}
......@@ -3911,7 +3923,7 @@ function CThumbnailsManager()
{
if (page.IsSelected && page.IsFocused)
{
context.fillStyle = "#FF00FF";
context.fillStyle = "#CA2B1F";
this.FocusRectDraw(context, _border, page.top - _border, page.right + _border, page.bottom + _border);
context.fill();
context.beginPath();
......@@ -3919,7 +3931,7 @@ function CThumbnailsManager()
}
else if (page.IsSelected)
{
context.fillStyle = "#ED9870";
context.fillStyle = "#9F1F15";
this.FocusRectDraw(context, _border, page.top - _border, page.right + _border, page.bottom + _border);
context.fill();
context.beginPath();
......@@ -3927,7 +3939,7 @@ function CThumbnailsManager()
}
else if (page.IsFocused)
{
context.fillStyle = "#8080FF";
context.fillStyle = "#FF5E52";
this.FocusRectDraw(context, _border, page.top - _border, page.right + _border, page.bottom + _border);
context.fill();
context.beginPath();
......@@ -4761,6 +4773,9 @@ function CSlideDrawer()
g.init(this.CachedCanvasCtx, w_px, h_px, w_mm, h_mm);
g.m_oFontManager = g_fontManager;
if (this.m_oWordControl.bIsRetinaSupport)
g.IsRetina = 2;
g.m_oCoordTransform.tx = -this.BoundsChecker.Bounds.min_x;
g.m_oCoordTransform.ty = -this.BoundsChecker.Bounds.min_y;
g.transform(1,0,0,1,0,0);
......@@ -4832,6 +4847,9 @@ function CSlideDrawer()
g.init(outputCtx, w_px, h_px, w_mm, h_mm);
g.m_oFontManager = g_fontManager;
if (this.m_oWordControl.bIsRetinaSupport)
g.IsRetina = 2;
g.m_oCoordTransform.tx = _x;
g.m_oCoordTransform.ty = _y;
g.transform(1,0,0,1,0,0);
......@@ -4849,4 +4867,15 @@ window.g_comment_image.asc_complete = false;
window.g_comment_image.onload = function(){
window.g_comment_image.asc_complete = true;
};
window.g_comment_image.src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAWCAYAAADafVyIAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOwgAADsIBFShKgAAAABp0RVh0U29mdHdhcmUAUGFpbnQuTkVUIHYzLjUuMTAw9HKhAAABUUlEQVRIS2P4//8/w993rw9/nV73/2NhwP8PSXYUYZAZILNAZgLNZmT4+/zhio8Ffv+/za77//vQyv9/zm6jCIPMAJkFMvPv0/tHGb5Orfn/bW4jVsWUYJCZXyZV/Wf4mOXx//eRNVgVUYJBZn7IcP3PAAo3bAqogUFmj1qAF49aQBAPEwtonpNB5QVNyqJ5zZCyCFjivQeXpgta/v8+vBqrYlIwyAyQWdDStB9RHwBLVZAgKNyIwciGfl/aCRcHmQEyC2hmP7g+AFkAxYxQjCyGLA6TY0G24NfO+f8/Znv8//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mjQsUjreK7vbq0d38fhVnqp3PFXvePnSMclB3q9Jw4DS+XNHFvHuq0X82d013SWqMGIrwjSia6B3dgPJrczhuWNC3Io7onQ6jfk0wrNazOJLNzp0l7iS2IWK0Duoo+gdbmUOz52j08GUTqQwwrOYhkAShjEesSKfRuVA5jRZJsTTO1fgMK8AdHA4+AvCiSsAHMU0KgfyP6JThelUITo4rIaS9yiwIp/GTXGW3NsUKEInUdGpAE+cd56s+EjS10xJRT6N8oHMQOdqzOjKFR17yadxgwcufsTnTjY80mlUFD/kcyeTOhmKXfWbW5d1KtW1nKyu5WR1D6WTRb76rd9nnUr5lnR8Szq+Czq1+/j6L0t698sXel/3tbRTJtZp8KT/5dWUz51Kmo5Xc0Gn3bxJRmaPZ8kMy02zLTrBseKcJnRabZ4Ol4VCGnp+q+2CTpD802m2x7Pc/k7ZqB8ATiqJ02CyEO/XTVa8vws6OLjtM3g4OP3bAHSKcHinCR3er6PTbwfYCZ1EvS2eBE5P69zB6R2agzZp6I7OFo8eDoNH7jTPQZs0dEgnOvRUfWQLp3kO2qShSzo4jA89nYdHcJrnoE0aOqUTHXpgBEfvNM9B1j9goQxEv1s60aHN4Oid5jnI+gcQHOp3TAeH4TGd5jm470gKB9jfNR1nOZjCA8I5NToWOcjhgeGcHB2LHGTwSOCcHh2LHNz7ZXBOkI5FDmr9J0jHIgd1/n8LiumvxDAoYwAAAABJRU5ErkJggg==";
var g_comment_image_offsets = [
[5, 0, 16, 15],
[31, 0, 16, 15],
[57, 0, 19, 18],
[86, 0, 19, 18],
[115, 0, 32, 30],
[157, 0, 32, 30],
[199, 0, 38, 36],
[247, 0, 38, 36]
];
......@@ -6,9 +6,6 @@
* To change this template use File | Settings | File Templates.
*/
var COMMENT_WIDTH = 30;
var COMMENT_HEIGHT = 25;
function Slide(presentation, slideLayout, slideNum)
{
this.kind = SLIDE_KIND;
......
......@@ -506,6 +506,7 @@ function CGraphics()
this.m_oLastFont2 = null;
this.ClearMode = false;
this.IsRetina = false;
}
CGraphics.prototype =
......@@ -2729,7 +2730,17 @@ CGraphics.prototype =
var _x = (this.m_oFullTransform.TransformPointX(x,y) >> 0);
var _y = (this.m_oFullTransform.TransformPointY(x,y) >> 0);
this.m_oContext.drawImage(window.g_comment_image, _x, _y);
var _index = 0;
if ((type & 0x02) == 0x02)
_index = 2;
if ((type & 0x01) == 0x01)
_index += 1;
if (this.IsRetina)
_index += 4;
var _offset = g_comment_image_offsets[_index];
this.m_oContext.drawImage(window.g_comment_image, _offset[0], _offset[1], _offset[2], _offset[3], _x, _y, _offset[2], _offset[3]);
}
}
else
......
......@@ -1717,18 +1717,23 @@ CAutoshapeTrack.prototype =
var __x = (xDst + dKoefX * x) >> 0;
var __y = (yDst + dKoefY * y) >> 0;
var __w = (window.COMMENT_WIDTH === undefined) ? 30 : window.COMMENT_WIDTH;
var __h = (window.COMMENT_HEIGHT === undefined) ? 30 : window.COMMENT_HEIGHT;
overlay.CheckRect(__x, __y, __w, __h);
var ctx = overlay.m_oContext;
var _oldAlpha = ctx.globalAlpha;
ctx.globalAlpha = 0.5;
ctx.setTransform(1,0,0,1,0,0);
ctx.drawImage(window.g_comment_image, __x, __y);
var _index = 0;
if ((type & 0x02) == 0x02)
_index = 2;
if ((type & 0x01) == 0x01)
_index += 1;
var _offset = g_comment_image_offsets[_index];
overlay.CheckRect(__x, __y, _offset[2], _offset[3]);
this.m_oContext.drawImage(window.g_comment_image, _offset[0], _offset[1], _offset[2], _offset[3], __x, __y, _offset[2], _offset[3]);
ctx.globalAlpha = _oldAlpha;
}
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment