Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sdkjs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
sdkjs
Commits
2ca0e582
Commit
2ca0e582
authored
Mar 23, 2016
by
Alexey.Musinov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[mobile] обновление скриптов (Bug 32016, Bug 32015)
parent
274e69b8
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
376 additions
and
113 deletions
+376
-113
Common/Native/Wrappers/ShapeDrawer.js
Common/Native/Wrappers/ShapeDrawer.js
+194
-56
Excel/native/Graphics.js
Excel/native/Graphics.js
+28
-24
Excel/native/ShapeDrawer.js
Excel/native/ShapeDrawer.js
+138
-25
Excel/native/native.js
Excel/native/native.js
+16
-8
No files found.
Common/Native/Wrappers/ShapeDrawer.js
View file @
2ca0e582
...
...
@@ -440,7 +440,6 @@ function CShapeDrawer()
{
this
.
Shape
=
null
;
this
.
Graphics
=
null
;
this
.
NativeGraphics
=
null
;
this
.
UniFill
=
null
;
this
.
Ln
=
null
;
this
.
Transform
=
null
;
...
...
@@ -457,7 +456,12 @@ function CShapeDrawer()
this
.
max_x
=
-
0xFFFF
;
this
.
max_y
=
-
0xFFFF
;
this
.
OldLineJoin
=
null
;
this
.
IsArrowsDrawing
=
false
;
this
.
IsCurrentPathCanArrows
=
true
;
this
.
bIsCheckBounds
=
false
;
this
.
IsRectShape
=
false
;
}
...
...
@@ -483,7 +487,12 @@ CShapeDrawer.prototype =
this
.
max_x
=
-
0xFFFF
;
this
.
max_y
=
-
0xFFFF
;
this
.
OldLineJoin
=
null
;
this
.
IsArrowsDrawing
=
false
;
this
.
IsCurrentPathCanArrows
=
true
;
this
.
bIsCheckBounds
=
false
;
this
.
IsRectShape
=
false
;
},
...
...
@@ -631,8 +640,21 @@ CShapeDrawer.prototype =
this
.
StrokeWidth
=
(
this
.
Ln
.
w
==
null
)
?
12700
:
parseInt
(
this
.
Ln
.
w
);
this
.
StrokeWidth
/=
36000.0
;
this
.
p_width
(
1000
*
this
.
StrokeWidth
);
if
(
graphics
.
IsSlideBoundsCheckerType
&&
!
this
.
bIsNoStrokeAttack
)
graphics
.
LineWidth
=
this
.
StrokeWidth
;
if
((
this
.
Ln
.
headEnd
!=
null
&&
this
.
Ln
.
headEnd
.
type
!=
null
)
||
(
this
.
Ln
.
tailEnd
!=
null
&&
this
.
Ln
.
tailEnd
.
type
!=
null
))
{
if
(
true
===
graphics
.
IsTrack
)
graphics
.
Graphics
.
ArrayPoints
=
[];
else
graphics
.
ArrayPoints
=
[];
}
if
(
this
.
Graphics
.
m_oContext
!=
null
&&
this
.
Ln
.
Join
!=
null
&&
this
.
Ln
.
Join
.
type
!=
null
)
this
.
OldLineJoin
=
this
.
Graphics
.
m_oContext
.
lineJoin
;
}
if
(
this
.
bIsTexture
||
bIsCheckBounds
)
...
...
@@ -804,6 +826,9 @@ CShapeDrawer.prototype =
if
(
mode
==
"
none
"
||
this
.
bIsNoFillAttack
)
return
;
if
(
this
.
Graphics
.
IsTrack
)
this
.
Graphics
.
m_oOverlay
.
ClearAll
=
true
;
if
(
this
.
Graphics
.
IsSlideBoundsCheckerType
)
return
;
...
...
@@ -966,6 +991,119 @@ CShapeDrawer.prototype =
this
.
NativeGraphics
[
"
PD_p_color
"
](
rgba
.
R
,
rgba
.
G
,
rgba
.
B
,
rgba
.
A
);
this
.
NativeGraphics
[
"
PD_Stroke
"
]();
if
(
this
.
IsRectShape
&&
this
.
Graphics
.
AddSmartRect
!==
undefined
)
{
if
(
undefined
!==
this
.
Shape
.
extX
)
this
.
Graphics
.
AddSmartRect
(
0
,
0
,
this
.
Shape
.
extX
,
this
.
Shape
.
extY
,
this
.
StrokeWidth
);
else
this
.
Graphics
.
ds
();
}
else
{
this
.
Graphics
.
ds
();
}
if
(
null
!=
this
.
OldLineJoin
&&
!
this
.
IsArrowsDrawing
)
{
this
.
Graphics
.
m_oContext
.
lineJoin
=
this
.
OldLineJoin
;
}
var
arr
=
(
this
.
Graphics
.
IsTrack
===
true
)
?
this
.
Graphics
.
Graphics
.
ArrayPoints
:
this
.
Graphics
.
ArrayPoints
;
if
(
arr
!=
null
&&
arr
.
length
>
1
&&
this
.
IsCurrentPathCanArrows
===
true
)
{
this
.
IsArrowsDrawing
=
true
;
// значит стрелки есть. теперь:
// определяем толщину линии "как есть"
// трансформируем точки в окончательные.
// и отправляем на отрисовку (с матрицей)
var
trans
=
(
this
.
Graphics
.
IsTrack
===
true
)
?
this
.
Graphics
.
Graphics
.
m_oFullTransform
:
this
.
Graphics
.
m_oFullTransform
;
var
trans1
=
global_MatrixTransformer
.
Invert
(
trans
);
var
x1
=
trans
.
TransformPointX
(
0
,
0
);
var
y1
=
trans
.
TransformPointY
(
0
,
0
);
var
x2
=
trans
.
TransformPointX
(
1
,
1
);
var
y2
=
trans
.
TransformPointY
(
1
,
1
);
var
dKoef
=
Math
.
sqrt
(((
x2
-
x1
)
*
(
x2
-
x1
)
+
(
y2
-
y1
)
*
(
y2
-
y1
))
/
2
);
var
_pen_w
=
(
this
.
Graphics
.
IsTrack
===
true
)
?
(
this
.
Graphics
.
Graphics
.
m_oContext
.
lineWidth
*
dKoef
)
:
(
this
.
Graphics
.
m_oContext
.
lineWidth
*
dKoef
);
var
_max_delta_eps2
=
0.001
;
if
(
this
.
Ln
.
headEnd
!=
null
)
{
var
_x1
=
trans
.
TransformPointX
(
arr
[
0
].
x
,
arr
[
0
].
y
);
var
_y1
=
trans
.
TransformPointY
(
arr
[
0
].
x
,
arr
[
0
].
y
);
var
_x2
=
trans
.
TransformPointX
(
arr
[
1
].
x
,
arr
[
1
].
y
);
var
_y2
=
trans
.
TransformPointY
(
arr
[
1
].
x
,
arr
[
1
].
y
);
var
_max_delta_eps
=
Math
.
max
(
this
.
Ln
.
headEnd
.
GetLen
(
_pen_w
),
5
);
var
_max_delta
=
Math
.
max
(
Math
.
abs
(
_x1
-
_x2
),
Math
.
abs
(
_y1
-
_y2
));
var
cur_point
=
2
;
while
(
_max_delta
<
_max_delta_eps
&&
cur_point
<
arr
.
length
)
{
_x2
=
trans
.
TransformPointX
(
arr
[
cur_point
].
x
,
arr
[
cur_point
].
y
);
_y2
=
trans
.
TransformPointY
(
arr
[
cur_point
].
x
,
arr
[
cur_point
].
y
);
_max_delta
=
Math
.
max
(
Math
.
abs
(
_x1
-
_x2
),
Math
.
abs
(
_y1
-
_y2
));
cur_point
++
;
}
if
(
_max_delta
>
_max_delta_eps2
)
{
if
(
this
.
Graphics
.
IsTrack
)
{
this
.
Graphics
.
Graphics
.
ArrayPoints
=
null
;
DrawLineEnd
(
_x1
,
_y1
,
_x2
,
_y2
,
this
.
Ln
.
headEnd
.
type
,
this
.
Ln
.
headEnd
.
GetWidth
(
_pen_w
),
this
.
Ln
.
headEnd
.
GetLen
(
_pen_w
),
this
,
trans1
);
this
.
Graphics
.
Graphics
.
ArrayPoints
=
arr
;
}
else
{
this
.
Graphics
.
ArrayPoints
=
null
;
DrawLineEnd
(
_x1
,
_y1
,
_x2
,
_y2
,
this
.
Ln
.
headEnd
.
type
,
this
.
Ln
.
headEnd
.
GetWidth
(
_pen_w
),
this
.
Ln
.
headEnd
.
GetLen
(
_pen_w
),
this
,
trans1
);
this
.
Graphics
.
ArrayPoints
=
arr
;
}
}
}
if
(
this
.
Ln
.
tailEnd
!=
null
)
{
var
_1
=
arr
.
length
-
1
;
var
_2
=
arr
.
length
-
2
;
var
_x1
=
trans
.
TransformPointX
(
arr
[
_1
].
x
,
arr
[
_1
].
y
);
var
_y1
=
trans
.
TransformPointY
(
arr
[
_1
].
x
,
arr
[
_1
].
y
);
var
_x2
=
trans
.
TransformPointX
(
arr
[
_2
].
x
,
arr
[
_2
].
y
);
var
_y2
=
trans
.
TransformPointY
(
arr
[
_2
].
x
,
arr
[
_2
].
y
);
var
_max_delta_eps
=
Math
.
max
(
this
.
Ln
.
tailEnd
.
GetLen
(
_pen_w
),
5
);
var
_max_delta
=
Math
.
max
(
Math
.
abs
(
_x1
-
_x2
),
Math
.
abs
(
_y1
-
_y2
));
var
cur_point
=
_2
-
1
;
while
(
_max_delta
<
_max_delta_eps
&&
cur_point
>=
0
)
{
_x2
=
trans
.
TransformPointX
(
arr
[
cur_point
].
x
,
arr
[
cur_point
].
y
);
_y2
=
trans
.
TransformPointY
(
arr
[
cur_point
].
x
,
arr
[
cur_point
].
y
);
_max_delta
=
Math
.
max
(
Math
.
abs
(
_x1
-
_x2
),
Math
.
abs
(
_y1
-
_y2
));
cur_point
--
;
}
if
(
_max_delta
>
_max_delta_eps2
)
{
if
(
this
.
Graphics
.
IsTrack
)
{
this
.
Graphics
.
Graphics
.
ArrayPoints
=
null
;
DrawLineEnd
(
_x1
,
_y1
,
_x2
,
_y2
,
this
.
Ln
.
tailEnd
.
type
,
this
.
Ln
.
tailEnd
.
GetWidth
(
_pen_w
),
this
.
Ln
.
tailEnd
.
GetLen
(
_pen_w
),
this
,
trans1
);
this
.
Graphics
.
Graphics
.
ArrayPoints
=
arr
;
}
else
{
this
.
Graphics
.
ArrayPoints
=
null
;
DrawLineEnd
(
_x1
,
_y1
,
_x2
,
_y2
,
this
.
Ln
.
tailEnd
.
type
,
this
.
Ln
.
tailEnd
.
GetWidth
(
_pen_w
),
this
.
Ln
.
tailEnd
.
GetLen
(
_pen_w
),
this
,
trans1
);
this
.
Graphics
.
ArrayPoints
=
arr
;
}
}
}
this
.
IsArrowsDrawing
=
false
;
}
},
drawFillStroke
:
function
(
bIsFill
,
fill_mode
,
bIsStroke
)
...
...
Excel/native/Graphics.js
View file @
2ca0e582
...
...
@@ -629,6 +629,7 @@ CGraphics.prototype =
if
(
0
!=
this
.
m_oPen
.
LineWidth
)
{
this
.
Native
[
"
PD_p_width
"
](
this
.
m_oPen
.
LineWidth
);
this
.
m_oContext
.
lineWidth
=
this
.
m_oPen
.
LineWidth
;
}
else
{
...
...
@@ -639,6 +640,7 @@ CGraphics.prototype =
var
_koef
=
Math
.
sqrt
(((
_x2
-
_x1
)
*
(
_x2
-
_x1
)
+
(
_y2
-
_y1
)
*
(
_y2
-
_y1
))
/
2
);
this
.
Native
[
"
PD_p_width
"
](
1
/
_koef
);
this
.
m_oContext
.
lineWidth
=
1
/
_koef
;
}
}
else
...
...
@@ -651,10 +653,12 @@ CGraphics.prototype =
var
koef
=
Math
.
sqrt
((
x
*
x
+
y
*
y
)
/
2
);
this
.
Native
[
"
PD_p_width
"
](
this
.
m_oPen
.
LineWidth
*
koef
);
this
.
m_oContext
.
lineWidth
=
this
.
m_oPen
.
LineWidth
*
koef
;
}
else
{
this
.
Native
[
"
PD_p_width
"
](
1
);
this
.
m_oContext
.
lineWidth
=
1
;
}
}
},
...
...
Excel/native/ShapeDrawer.js
View file @
2ca0e582
...
...
@@ -963,10 +963,123 @@ CShapeDrawer.prototype =
}
var
rgba
=
this
.
StrokeUniColor
;
this
.
NativeGraphics
[
"
PD_p_width
"
](
this
.
StrokeWidth
);
this
.
NativeGraphics
[
"
PD_p_color
"
](
rgba
.
R
,
rgba
.
G
,
rgba
.
B
,
rgba
.
A
);
this
.
NativeGraphics
[
"
PD_Stroke
"
]();
if
(
this
.
IsRectShape
&&
this
.
Graphics
.
AddSmartRect
!==
undefined
)
{
// if (undefined !== this.Shape.extX)
// this.Graphics.AddSmartRect(0, 0, this.Shape.extX, this.Shape.extY, this.StrokeWidth);
// else
// this.Graphics.ds();
}
else
{
// this.Graphics.ds();
}
if
(
null
!=
this
.
OldLineJoin
&&
!
this
.
IsArrowsDrawing
)
{
this
.
Graphics
.
m_oContext
.
lineJoin
=
this
.
OldLineJoin
;
}
var
arr
=
(
this
.
Graphics
.
IsTrack
===
true
)
?
this
.
Graphics
.
Graphics
.
ArrayPoints
:
this
.
Graphics
.
ArrayPoints
;
if
(
arr
!=
null
&&
arr
.
length
>
1
&&
this
.
IsCurrentPathCanArrows
===
true
)
{
this
.
IsArrowsDrawing
=
true
;
// значит стрелки есть. теперь:
// определяем толщину линии "как есть"
// трансформируем точки в окончательные.
// и отправляем на отрисовку (с матрицей)
var
trans
=
(
this
.
Graphics
.
IsTrack
===
true
)
?
this
.
Graphics
.
Graphics
.
m_oFullTransform
:
this
.
Graphics
.
m_oFullTransform
;
var
trans1
=
global_MatrixTransformer
.
Invert
(
trans
);
var
x1
=
trans
.
TransformPointX
(
0
,
0
);
var
y1
=
trans
.
TransformPointY
(
0
,
0
);
var
x2
=
trans
.
TransformPointX
(
1
,
1
);
var
y2
=
trans
.
TransformPointY
(
1
,
1
);
var
dKoef
=
Math
.
sqrt
(((
x2
-
x1
)
*
(
x2
-
x1
)
+
(
y2
-
y1
)
*
(
y2
-
y1
))
/
2
);
var
_pen_w
=
(
this
.
Graphics
.
IsTrack
===
true
)
?
(
this
.
Graphics
.
Graphics
.
m_oContext
.
lineWidth
*
dKoef
)
:
(
this
.
Graphics
.
m_oContext
.
lineWidth
*
dKoef
);
var
_max_delta_eps2
=
0.001
;
if
(
this
.
Ln
.
headEnd
!=
null
)
{
var
_x1
=
trans
.
TransformPointX
(
arr
[
0
].
x
,
arr
[
0
].
y
);
var
_y1
=
trans
.
TransformPointY
(
arr
[
0
].
x
,
arr
[
0
].
y
);
var
_x2
=
trans
.
TransformPointX
(
arr
[
1
].
x
,
arr
[
1
].
y
);
var
_y2
=
trans
.
TransformPointY
(
arr
[
1
].
x
,
arr
[
1
].
y
);
var
_max_delta_eps
=
Math
.
max
(
this
.
Ln
.
headEnd
.
GetLen
(
_pen_w
),
5
);
var
_max_delta
=
Math
.
max
(
Math
.
abs
(
_x1
-
_x2
),
Math
.
abs
(
_y1
-
_y2
));
var
cur_point
=
2
;
while
(
_max_delta
<
_max_delta_eps
&&
cur_point
<
arr
.
length
)
{
_x2
=
trans
.
TransformPointX
(
arr
[
cur_point
].
x
,
arr
[
cur_point
].
y
);
_y2
=
trans
.
TransformPointY
(
arr
[
cur_point
].
x
,
arr
[
cur_point
].
y
);
_max_delta
=
Math
.
max
(
Math
.
abs
(
_x1
-
_x2
),
Math
.
abs
(
_y1
-
_y2
));
cur_point
++
;
}
if
(
_max_delta
>
_max_delta_eps2
)
{
if
(
this
.
Graphics
.
IsTrack
)
{
this
.
Graphics
.
Graphics
.
ArrayPoints
=
null
;
DrawLineEnd
(
_x1
,
_y1
,
_x2
,
_y2
,
this
.
Ln
.
headEnd
.
type
,
this
.
Ln
.
headEnd
.
GetWidth
(
_pen_w
),
this
.
Ln
.
headEnd
.
GetLen
(
_pen_w
),
this
,
trans1
);
this
.
Graphics
.
Graphics
.
ArrayPoints
=
arr
;
}
else
{
this
.
Graphics
.
ArrayPoints
=
null
;
DrawLineEnd
(
_x1
,
_y1
,
_x2
,
_y2
,
this
.
Ln
.
headEnd
.
type
,
this
.
Ln
.
headEnd
.
GetWidth
(
_pen_w
),
this
.
Ln
.
headEnd
.
GetLen
(
_pen_w
),
this
,
trans1
);
this
.
Graphics
.
ArrayPoints
=
arr
;
}
}
}
if
(
this
.
Ln
.
tailEnd
!=
null
)
{
var
_1
=
arr
.
length
-
1
;
var
_2
=
arr
.
length
-
2
;
var
_x1
=
trans
.
TransformPointX
(
arr
[
_1
].
x
,
arr
[
_1
].
y
);
var
_y1
=
trans
.
TransformPointY
(
arr
[
_1
].
x
,
arr
[
_1
].
y
);
var
_x2
=
trans
.
TransformPointX
(
arr
[
_2
].
x
,
arr
[
_2
].
y
);
var
_y2
=
trans
.
TransformPointY
(
arr
[
_2
].
x
,
arr
[
_2
].
y
);
var
_max_delta_eps
=
Math
.
max
(
this
.
Ln
.
tailEnd
.
GetLen
(
_pen_w
),
5
);
var
_max_delta
=
Math
.
max
(
Math
.
abs
(
_x1
-
_x2
),
Math
.
abs
(
_y1
-
_y2
));
var
cur_point
=
_2
-
1
;
while
(
_max_delta
<
_max_delta_eps
&&
cur_point
>=
0
)
{
_x2
=
trans
.
TransformPointX
(
arr
[
cur_point
].
x
,
arr
[
cur_point
].
y
);
_y2
=
trans
.
TransformPointY
(
arr
[
cur_point
].
x
,
arr
[
cur_point
].
y
);
_max_delta
=
Math
.
max
(
Math
.
abs
(
_x1
-
_x2
),
Math
.
abs
(
_y1
-
_y2
));
cur_point
--
;
}
if
(
_max_delta
>
_max_delta_eps2
)
{
if
(
this
.
Graphics
.
IsTrack
)
{
this
.
Graphics
.
Graphics
.
ArrayPoints
=
null
;
DrawLineEnd
(
_x1
,
_y1
,
_x2
,
_y2
,
this
.
Ln
.
tailEnd
.
type
,
this
.
Ln
.
tailEnd
.
GetWidth
(
_pen_w
),
this
.
Ln
.
tailEnd
.
GetLen
(
_pen_w
),
this
,
trans1
);
this
.
Graphics
.
Graphics
.
ArrayPoints
=
arr
;
}
else
{
this
.
Graphics
.
ArrayPoints
=
null
;
DrawLineEnd
(
_x1
,
_y1
,
_x2
,
_y2
,
this
.
Ln
.
tailEnd
.
type
,
this
.
Ln
.
tailEnd
.
GetWidth
(
_pen_w
),
this
.
Ln
.
tailEnd
.
GetLen
(
_pen_w
),
this
,
trans1
);
this
.
Graphics
.
ArrayPoints
=
arr
;
}
}
}
this
.
IsArrowsDrawing
=
false
;
}
},
drawFillStroke
:
function
(
bIsFill
,
fill_mode
,
bIsStroke
)
...
...
Excel/native/native.js
View file @
2ca0e582
...
...
@@ -4028,10 +4028,10 @@ function OfflineEditor () {
var
styleThumbnailWidth
=
Math
.
floor
(
92.0
*
pxToMM
);
var
styleThumbnailHeight
=
Math
.
floor
(
48.0
*
pxToMM
);
asc
.
AutoFilters
.
prototype
=
Object
.
create
(
asc
.
AutoFilters
.
prototype
);
asc
.
AutoFilters
.
prototype
.
constructor
=
asc
.
AutoFilters
;
asc
.
WorkbookView
.
prototype
=
Object
.
create
(
asc
.
WorkbookView
.
prototype
);
asc
.
WorkbookView
.
prototype
.
constructor
=
asc
.
WorkbookView
;
asc
.
AutoFilters
.
prototype
.
getTablePictures
=
function
(
wb
,
fmgrGraphics
,
oFont
)
{
asc
.
WorkbookView
.
prototype
.
af_
getTablePictures
=
function
(
wb
,
fmgrGraphics
,
oFont
)
{
window
[
'
native
'
].
SetStylesType
(
1
);
...
...
@@ -4054,14 +4054,14 @@ function OfflineEditor () {
if
(
customStyles
[
i
].
table
)
{
window
[
'
native
'
].
BeginDrawDocumentStyle
(
customStyles
[
i
].
name
,
n
);
this
.
_draw
SmallIconTable
(
canvas
,
customStyles
[
i
],
fmgrGraphics
,
oFont
);
this
.
af_get
SmallIconTable
(
canvas
,
customStyles
[
i
],
fmgrGraphics
,
oFont
);
// options =
// {
// name: i,
// displayName: customStyles[i].displayName,
// type: 'custom',
// image: this.
_draw
SmallIconTable(canvas, customStyles[i], fmgrGraphics, oFont)
// image: this.
af_get
SmallIconTable(canvas, customStyles[i], fmgrGraphics, oFont)
// };
// result[n] = new formatTablePictures(options);
...
...
@@ -4079,14 +4079,14 @@ function OfflineEditor () {
if
(
defaultStyles
[
i
].
table
)
{
window
[
'
native
'
].
BeginDrawDefaultStyle
(
defaultStyles
[
i
].
name
,
n
);
this
.
_draw
SmallIconTable
(
canvas
,
defaultStyles
[
i
],
fmgrGraphics
,
oFont
);
this
.
af_get
SmallIconTable
(
canvas
,
defaultStyles
[
i
],
fmgrGraphics
,
oFont
);
// options =
// {
// name: i,
// displayName: defaultStyles[i].displayName,
// type: 'default',
// image: this.
_draw
SmallIconTable(canvas, defaultStyles[i], fmgrGraphics, oFont)
// image: this.
af_get
SmallIconTable(canvas, defaultStyles[i], fmgrGraphics, oFont)
// };
//result[n] = new formatTablePictures(options);
n
++
;
...
...
@@ -4097,7 +4097,7 @@ function OfflineEditor () {
}
return
result
;
};
asc
.
AutoFilters
.
prototype
.
_draw
SmallIconTable
=
function
(
canvas
,
style
,
fmgrGraphics
,
oFont
)
{
asc
.
WorkbookView
.
prototype
.
af_get
SmallIconTable
=
function
(
canvas
,
style
,
fmgrGraphics
,
oFont
)
{
var
ctx
=
new
Asc
.
DrawingContext
({
canvas
:
canvas
,
units
:
0
/*pt*/
,
fmgrGraphics
:
fmgrGraphics
,
font
:
oFont
});
var
styleOptions
=
style
;
...
...
@@ -4602,12 +4602,20 @@ function offline_mouse_down(x, y, pin, isViewerMode, isFormulaEditMode, isRangeR
ws
.
isChartAreaEditMode
=
false
;
}
window
.
AscAlwaysSaveAspectOnResizeTrack
=
true
;
var
ischart
=
false
;
var
controller
=
ws
.
objectRender
.
controller
;
var
selected_objects
=
controller
.
selection
.
groupSelection
?
controller
.
selection
.
groupSelection
.
selectedObjects
:
controller
.
selectedObjects
;
if
(
selected_objects
.
length
===
1
&&
selected_objects
[
0
].
getObjectType
()
===
historyitem_type_ChartSpace
)
{
ischart
=
true
;
}
else
if
(
selected_objects
.
length
===
1
&&
selected_objects
[
0
].
getObjectType
()
===
historyitem_type_Shape
)
{
var
shapeObj
=
selected_objects
[
0
];
if
(
shapeObj
.
spPr
&&
shapeObj
.
spPr
.
geometry
&&
shapeObj
.
spPr
.
geometry
.
preset
===
"
line
"
)
{
window
.
AscAlwaysSaveAspectOnResizeTrack
=
false
;
}
}
return
{
id
:
graphicsInfo
.
id
,
ischart
:
ischart
};
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment