Commit 2a3adc1c authored by Sergey Luzyanin's avatar Sergey Luzyanin

fix Bug 28132; delete unused code

parent 8d6e7b2e
...@@ -257,203 +257,6 @@ function DrawLineEnd(xEnd, yEnd, xPrev, yPrev, type, w, len, drawer, trans) ...@@ -257,203 +257,6 @@ function DrawLineEnd(xEnd, yEnd, xPrev, yPrev, type, w, len, drawer, trans)
} }
//рисуем конечную стрелку
function DrawTailEnd(type, length, width, x, y, angle, graphics, array_points)
{
var sin, cos;
sin=Math.sin(angle);
cos=Math.cos(angle);
switch(type)
{
case AscFormat.ar_arrow:
{
var xb, yb, xc, yc;
xb=-length;
yb=-width*0.5;
xc=xb;
yc=yb+width;
graphics._s();
graphics._m(xb*cos-yb*sin+x, xb*sin+yb*cos+y);
graphics._l(x, y);
graphics._l(xc*cos-yc*sin+x, xc*sin+yc*cos+y);
graphics.ds();
break;
}
case AscFormat.ar_diamond:
{
var xd, yd;
xb=-length*0.5;
yb=-width*0.5;
xc=-length;
yc=0;
xd=xb;
yd=yb+width;
graphics._s();
graphics._m(xb*cos-yb*sin+x, xb*sin+yb*cos+y);
graphics._l(x, y);
graphics._l(xd*cos-yd*sin+x, xd*sin+yd*cos+y);
graphics._l(xc*cos-yc*sin+x, xc*sin+yc*cos+y);
graphics._z();
graphics.ds();
graphics.df();
break;
}
case AscFormat.ar_none:
{
break;
}
case AscFormat.ar_oval:
{
EllipseN(graphics, x, y, length*0.5, width*0.5, angle);
break;
}
case AscFormat.ar_stealth:
{
xb=-length;
yb=-width*0.5;
xc=-length*0.5;
yc=0;
xd=xb;
yd=-yb;
graphics._s();
graphics._m(x, y);
graphics._l(xb*cos-yb*sin+x, xb*sin+yb*cos+y);
graphics._l(xc*cos-yc*sin+x, xc*sin+yc*cos+y);
graphics._l(xd*cos-yd*sin+x, xd*sin+yd*cos+y);
graphics._z();
graphics.ds();
graphics.df();
break;
}
case AscFormat.ar_triangle:
{
xb=-length;
yb=-width*0.5;
xc=xb;
yc=-yb;
graphics._s();
graphics._m(x, y);
graphics._l(xb*cos-yb*sin+x, xb*sin+yb*cos+y);
graphics._l(xc*cos-yc*sin+x, xc*sin+yc*cos+y);
graphics._z();
graphics.ds();
graphics.df();
break;
}
}
}
//рисуем начальную стрелку
function DrawHeadEnd(type, length, width, x, y, angle, graphics)
{
var sin, cos;
sin=Math.sin(angle);
cos=Math.cos(angle);
switch(type)
{
case AscFormat.ar_arrow:
{
var xb, yb, xc, yc;
xb=length;
yb=-width*0.5;
xc=xb;
yc=yb+width;
graphics._s();
graphics._m(xb*cos-yb*sin+x, xb*sin+yb*cos+y);
graphics._l(x, y);
graphics._l(xc*cos-yc*sin+x, xc*sin+yc*cos+y);
graphics.ds();
break;
}
case AscFormat.ar_diamond:
{
var xd, yd;
xb=length*0.5;
yb=-width*0.5;
xc=length;
yc=0;
xd=xb;
yd=yb+width;
graphics._s();
graphics._m(xb*cos-yb*sin+x, xb*sin+yb*cos+y);
graphics._l(x, y);
graphics._l(xd*cos-yd*sin+x, xd*sin+yd*cos+y);
graphics._l(xc*cos-yc*sin+x, xc*sin+yc*cos+y);
graphics._z();
graphics.ds();
graphics.df();
break;
}
case AscFormat.ar_none:
{
break;
}
case AscFormat.ar_oval:
{
Ellipse2(graphics, x, y, length*0.5, width*0.5, angle);
break;
}
case AscFormat.ar_stealth:
{
xb=length;
yb=-width*0.5;
xc=length*0.5;
yc=0;
xd=xb;
yd=-yb;
graphics._s();
graphics._m(x, y);
graphics._l(xb*cos-yb*sin+x, xb*sin+yb*cos+y);
graphics._l(xc*cos-yc*sin+x, xc*sin+yc*cos+y);
graphics._l(xd*cos-yd*sin+x, xd*sin+yd*cos+y);
graphics._z();
graphics.ds();
graphics.df();
break;
}
case AscFormat.ar_triangle:
{
xb=length;
yb=-width*0.5;
xc=xb;
yc=-yb;
graphics._s();
graphics._m(x, y);
graphics._l(xb*cos-yb*sin+x, xb*sin+yb*cos+y);
graphics._l(xc*cos-yc*sin+x, xc*sin+yc*cos+y);
graphics._z();
graphics.ds();
graphics.df();
break;
}
}
}
function CShapeDrawer() function CShapeDrawer()
{ {
this.Shape = null; this.Shape = null;
......
...@@ -246,203 +246,6 @@ function DrawLineEnd(xEnd, yEnd, xPrev, yPrev, type, w, len, drawer, trans) ...@@ -246,203 +246,6 @@ function DrawLineEnd(xEnd, yEnd, xPrev, yPrev, type, w, len, drawer, trans)
} }
//рисуем конечную стрелку
function DrawTailEnd(type, length, width, x, y, angle, graphics, array_points)
{
var sin, cos;
sin=Math.sin(angle);
cos=Math.cos(angle);
switch(type)
{
case AscFormat.ar_arrow:
{
var xb, yb, xc, yc;
xb=-length;
yb=-width*0.5;
xc=xb;
yc=yb+width;
graphics._s();
graphics._m(xb*cos-yb*sin+x, xb*sin+yb*cos+y);
graphics._l(x, y);
graphics._l(xc*cos-yc*sin+x, xc*sin+yc*cos+y);
graphics.ds();
break;
}
case AscFormat.ar_diamond:
{
var xd, yd;
xb=-length*0.5;
yb=-width*0.5;
xc=-length;
yc=0;
xd=xb;
yd=yb+width;
graphics._s();
graphics._m(xb*cos-yb*sin+x, xb*sin+yb*cos+y);
graphics._l(x, y);
graphics._l(xd*cos-yd*sin+x, xd*sin+yd*cos+y);
graphics._l(xc*cos-yc*sin+x, xc*sin+yc*cos+y);
graphics._z();
graphics.ds();
graphics.df();
break;
}
case AscFormat.ar_none:
{
break;
}
case AscFormat.ar_oval:
{
EllipseN(graphics, x, y, length*0.5, width*0.5, angle);
break;
}
case AscFormat.ar_stealth:
{
xb=-length;
yb=-width*0.5;
xc=-length*0.5;
yc=0;
xd=xb;
yd=-yb;
graphics._s();
graphics._m(x, y);
graphics._l(xb*cos-yb*sin+x, xb*sin+yb*cos+y);
graphics._l(xc*cos-yc*sin+x, xc*sin+yc*cos+y);
graphics._l(xd*cos-yd*sin+x, xd*sin+yd*cos+y);
graphics._z();
graphics.ds();
graphics.df();
break;
}
case AscFormat.ar_triangle:
{
xb=-length;
yb=-width*0.5;
xc=xb;
yc=-yb;
graphics._s();
graphics._m(x, y);
graphics._l(xb*cos-yb*sin+x, xb*sin+yb*cos+y);
graphics._l(xc*cos-yc*sin+x, xc*sin+yc*cos+y);
graphics._z();
graphics.ds();
graphics.df();
break;
}
}
}
//рисуем начальную стрелку
function DrawHeadEnd(type, length, width, x, y, angle, graphics)
{
var sin, cos;
sin=Math.sin(angle);
cos=Math.cos(angle);
switch(type)
{
case AscFormat.ar_arrow:
{
var xb, yb, xc, yc;
xb=length;
yb=-width*0.5;
xc=xb;
yc=yb+width;
graphics._s();
graphics._m(xb*cos-yb*sin+x, xb*sin+yb*cos+y);
graphics._l(x, y);
graphics._l(xc*cos-yc*sin+x, xc*sin+yc*cos+y);
graphics.ds();
break;
}
case AscFormat.ar_diamond:
{
var xd, yd;
xb=length*0.5;
yb=-width*0.5;
xc=length;
yc=0;
xd=xb;
yd=yb+width;
graphics._s();
graphics._m(xb*cos-yb*sin+x, xb*sin+yb*cos+y);
graphics._l(x, y);
graphics._l(xd*cos-yd*sin+x, xd*sin+yd*cos+y);
graphics._l(xc*cos-yc*sin+x, xc*sin+yc*cos+y);
graphics._z();
graphics.ds();
graphics.df();
break;
}
case AscFormat.ar_none:
{
break;
}
case AscFormat.ar_oval:
{
Ellipse2(graphics, x, y, length*0.5, width*0.5, angle);
break;
}
case AscFormat.ar_stealth:
{
xb=length;
yb=-width*0.5;
xc=length*0.5;
yc=0;
xd=xb;
yd=-yb;
graphics._s();
graphics._m(x, y);
graphics._l(xb*cos-yb*sin+x, xb*sin+yb*cos+y);
graphics._l(xc*cos-yc*sin+x, xc*sin+yc*cos+y);
graphics._l(xd*cos-yd*sin+x, xd*sin+yd*cos+y);
graphics._z();
graphics.ds();
graphics.df();
break;
}
case AscFormat.ar_triangle:
{
xb=length;
yb=-width*0.5;
xc=xb;
yc=-yb;
graphics._s();
graphics._m(x, y);
graphics._l(xb*cos-yb*sin+x, xb*sin+yb*cos+y);
graphics._l(xc*cos-yc*sin+x, xc*sin+yc*cos+y);
graphics._z();
graphics.ds();
graphics.df();
break;
}
}
}
function CShapeDrawer() function CShapeDrawer()
{ {
this.Shape = null; this.Shape = null;
......
...@@ -3299,6 +3299,7 @@ function CEditorPage(api) ...@@ -3299,6 +3299,7 @@ function CEditorPage(api)
var _len = master.sldLayoutLst.length; var _len = master.sldLayoutLst.length;
var arr = new Array(_len); var arr = new Array(_len);
var bRedraw = Math.abs(this.m_oLayoutDrawer.WidthMM - this.m_oLogicDocument.Width) > MOVE_DELTA || Math.abs(this.m_oLayoutDrawer.HeightMM - this.m_oLogicDocument.Height) > MOVE_DELTA;
for (var i = 0; i < _len; i++) for (var i = 0; i < _len; i++)
{ {
arr[i] = new CLayoutThumbnail(); arr[i] = new CLayoutThumbnail();
...@@ -3310,7 +3311,7 @@ function CEditorPage(api) ...@@ -3310,7 +3311,7 @@ function CEditorPage(api)
arr[i].Name = master.sldLayoutLst[i].cSld.name; arr[i].Name = master.sldLayoutLst[i].cSld.name;
if ("" == master.sldLayoutLst[i].ImageBase64 || Math.abs(this.m_oLayoutDrawer.WidthMM - this.m_oLogicDocument.Width) > MOVE_DELTA || Math.abs(this.m_oLayoutDrawer.HeightMM - this.m_oLogicDocument.Height) > MOVE_DELTA) if ("" == master.sldLayoutLst[i].ImageBase64 || bRedraw)
{ {
this.m_oLayoutDrawer.WidthMM = this.m_oLogicDocument.Width; this.m_oLayoutDrawer.WidthMM = this.m_oLogicDocument.Width;
this.m_oLayoutDrawer.HeightMM = this.m_oLogicDocument.Height; this.m_oLayoutDrawer.HeightMM = this.m_oLogicDocument.Height;
......
...@@ -257,203 +257,6 @@ function DrawLineEnd(xEnd, yEnd, xPrev, yPrev, type, w, len, drawer, trans) ...@@ -257,203 +257,6 @@ function DrawLineEnd(xEnd, yEnd, xPrev, yPrev, type, w, len, drawer, trans)
} }
//рисуем конечную стрелку
function DrawTailEnd(type, length, width, x, y, angle, graphics, array_points)
{
var sin, cos;
sin=Math.sin(angle);
cos=Math.cos(angle);
switch(type)
{
case AscFormat.ar_arrow:
{
var xb, yb, xc, yc;
xb=-length;
yb=-width*0.5;
xc=xb;
yc=yb+width;
graphics._s();
graphics._m(xb*cos-yb*sin+x, xb*sin+yb*cos+y);
graphics._l(x, y);
graphics._l(xc*cos-yc*sin+x, xc*sin+yc*cos+y);
graphics.ds();
break;
}
case AscFormat.ar_diamond:
{
var xd, yd;
xb=-length*0.5;
yb=-width*0.5;
xc=-length;
yc=0;
xd=xb;
yd=yb+width;
graphics._s();
graphics._m(xb*cos-yb*sin+x, xb*sin+yb*cos+y);
graphics._l(x, y);
graphics._l(xd*cos-yd*sin+x, xd*sin+yd*cos+y);
graphics._l(xc*cos-yc*sin+x, xc*sin+yc*cos+y);
graphics._z();
graphics.ds();
graphics.df();
break;
}
case AscFormat.ar_none:
{
break;
}
case AscFormat.ar_oval:
{
EllipseN(graphics, x, y, length*0.5, width*0.5, angle);
break;
}
case AscFormat.ar_stealth:
{
xb=-length;
yb=-width*0.5;
xc=-length*0.5;
yc=0;
xd=xb;
yd=-yb;
graphics._s();
graphics._m(x, y);
graphics._l(xb*cos-yb*sin+x, xb*sin+yb*cos+y);
graphics._l(xc*cos-yc*sin+x, xc*sin+yc*cos+y);
graphics._l(xd*cos-yd*sin+x, xd*sin+yd*cos+y);
graphics._z();
graphics.ds();
graphics.df();
break;
}
case AscFormat.ar_triangle:
{
xb=-length;
yb=-width*0.5;
xc=xb;
yc=-yb;
graphics._s();
graphics._m(x, y);
graphics._l(xb*cos-yb*sin+x, xb*sin+yb*cos+y);
graphics._l(xc*cos-yc*sin+x, xc*sin+yc*cos+y);
graphics._z();
graphics.ds();
graphics.df();
break;
}
}
}
//рисуем начальную стрелку
function DrawHeadEnd(type, length, width, x, y, angle, graphics)
{
var sin, cos;
sin=Math.sin(angle);
cos=Math.cos(angle);
switch(type)
{
case AscFormat.ar_arrow:
{
var xb, yb, xc, yc;
xb=length;
yb=-width*0.5;
xc=xb;
yc=yb+width;
graphics._s();
graphics._m(xb*cos-yb*sin+x, xb*sin+yb*cos+y);
graphics._l(x, y);
graphics._l(xc*cos-yc*sin+x, xc*sin+yc*cos+y);
graphics.ds();
break;
}
case AscFormat.ar_diamond:
{
var xd, yd;
xb=length*0.5;
yb=-width*0.5;
xc=length;
yc=0;
xd=xb;
yd=yb+width;
graphics._s();
graphics._m(xb*cos-yb*sin+x, xb*sin+yb*cos+y);
graphics._l(x, y);
graphics._l(xd*cos-yd*sin+x, xd*sin+yd*cos+y);
graphics._l(xc*cos-yc*sin+x, xc*sin+yc*cos+y);
graphics._z();
graphics.ds();
graphics.df();
break;
}
case AscFormat.ar_none:
{
break;
}
case AscFormat.ar_oval:
{
Ellipse2(graphics, x, y, length*0.5, width*0.5, angle);
break;
}
case AscFormat.ar_stealth:
{
xb=length;
yb=-width*0.5;
xc=length*0.5;
yc=0;
xd=xb;
yd=-yb;
graphics._s();
graphics._m(x, y);
graphics._l(xb*cos-yb*sin+x, xb*sin+yb*cos+y);
graphics._l(xc*cos-yc*sin+x, xc*sin+yc*cos+y);
graphics._l(xd*cos-yd*sin+x, xd*sin+yd*cos+y);
graphics._z();
graphics.ds();
graphics.df();
break;
}
case AscFormat.ar_triangle:
{
xb=length;
yb=-width*0.5;
xc=xb;
yc=-yb;
graphics._s();
graphics._m(x, y);
graphics._l(xb*cos-yb*sin+x, xb*sin+yb*cos+y);
graphics._l(xc*cos-yc*sin+x, xc*sin+yc*cos+y);
graphics._z();
graphics.ds();
graphics.df();
break;
}
}
}
function CShapeDrawer() function CShapeDrawer()
{ {
this.Shape = null; this.Shape = null;
......
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