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
7ffeca0b
Commit
7ffeca0b
authored
Feb 03, 2017
by
Sergey Luzyanin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix Bug 33882
parent
2de28ba9
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
314 additions
and
68 deletions
+314
-68
cell/model/DrawingObjects/Format/ShapePrototype.js
cell/model/DrawingObjects/Format/ShapePrototype.js
+8
-0
common/Drawings/DrawingsChanges.js
common/Drawings/DrawingsChanges.js
+126
-35
common/Drawings/Format/Geometry.js
common/Drawings/Format/Geometry.js
+164
-30
common/Drawings/Format/Path.js
common/Drawings/Format/Path.js
+16
-3
No files found.
cell/model/DrawingObjects/Format/ShapePrototype.js
View file @
7ffeca0b
...
@@ -220,6 +220,10 @@ AscCommon.extendClass(CChangesDrawingObjectsAddToDrawingObjects, AscDFH.CChanges
...
@@ -220,6 +220,10 @@ AscCommon.extendClass(CChangesDrawingObjectsAddToDrawingObjects, AscDFH.CChanges
this
.
Pos
=
Reader
.
GetLong
();
this
.
Pos
=
Reader
.
GetLong
();
};
};
CChangesDrawingObjectsAddToDrawingObjects
.
prototype
.
CreateReverseChange
=
function
(){
return
new
CChangesDrawingObjectsRemoveFromDrawingObjects
(
this
.
Class
,
this
.
Pos
);
};
AscDFH
.
changesFactory
[
AscDFH
.
historyitem_AutoShapes_AddToDrawingObjects
]
=
CChangesDrawingObjectsAddToDrawingObjects
;
AscDFH
.
changesFactory
[
AscDFH
.
historyitem_AutoShapes_AddToDrawingObjects
]
=
CChangesDrawingObjectsAddToDrawingObjects
;
function
CChangesDrawingObjectsRemoveFromDrawingObjects
(
Class
,
Pos
){
function
CChangesDrawingObjectsRemoveFromDrawingObjects
(
Class
,
Pos
){
this
.
Type
=
AscDFH
.
historyitem_AutoShapes_RemoveFromDrawingObjects
;
this
.
Type
=
AscDFH
.
historyitem_AutoShapes_RemoveFromDrawingObjects
;
...
@@ -240,6 +244,10 @@ AscCommon.extendClass(CChangesDrawingObjectsRemoveFromDrawingObjects, AscDFH.CCh
...
@@ -240,6 +244,10 @@ AscCommon.extendClass(CChangesDrawingObjectsRemoveFromDrawingObjects, AscDFH.CCh
this
.
Pos
=
Reader
.
GetLong
();
this
.
Pos
=
Reader
.
GetLong
();
};
};
CChangesDrawingObjectsRemoveFromDrawingObjects
.
prototype
.
CreateReverseChange
=
function
(){
return
new
CChangesDrawingObjectsAddToDrawingObjects
(
this
.
Class
,
this
.
Pos
);
};
AscDFH
.
changesFactory
[
AscDFH
.
historyitem_AutoShapes_RemoveFromDrawingObjects
]
=
CChangesDrawingObjectsRemoveFromDrawingObjects
;
AscDFH
.
changesFactory
[
AscDFH
.
historyitem_AutoShapes_RemoveFromDrawingObjects
]
=
CChangesDrawingObjectsRemoveFromDrawingObjects
;
CShape
.
prototype
.
addToDrawingObjects
=
function
(
pos
)
CShape
.
prototype
.
addToDrawingObjects
=
function
(
pos
)
...
...
common/Drawings/DrawingsChanges.js
View file @
7ffeca0b
This diff is collapsed.
Click to expand it.
common/Drawings/Format/Geometry.js
View file @
7ffeca0b
This diff is collapsed.
Click to expand it.
common/Drawings/Format/Path.js
View file @
7ffeca0b
...
@@ -60,25 +60,37 @@ var MOVE_DELTA = AscFormat.MOVE_DELTA;
...
@@ -60,25 +60,37 @@ var MOVE_DELTA = AscFormat.MOVE_DELTA;
var
cToRad2
=
(
Math
.
PI
/
60000
)
/
180
;
var
cToRad2
=
(
Math
.
PI
/
60000
)
/
180
;
function
CChangesDrawingsAddPathCommand
(
Class
,
oCommand
,
nIndex
){
function
CChangesDrawingsAddPathCommand
(
Class
,
oCommand
,
nIndex
,
bReverse
){
this
.
Type
=
AscDFH
.
historyitem_PathAddPathCommand
;
this
.
Type
=
AscDFH
.
historyitem_PathAddPathCommand
;
this
.
Command
=
oCommand
;
this
.
Command
=
oCommand
;
this
.
Index
=
nIndex
;
this
.
Index
=
nIndex
;
this
.
bReverse
=
bReverse
;
CChangesDrawingsAddPathCommand
.
superclass
.
constructor
.
call
(
this
,
Class
);
CChangesDrawingsAddPathCommand
.
superclass
.
constructor
.
call
(
this
,
Class
);
}
}
AscCommon
.
extendClass
(
CChangesDrawingsAddPathCommand
,
AscDFH
.
CChangesBase
);
AscCommon
.
extendClass
(
CChangesDrawingsAddPathCommand
,
AscDFH
.
CChangesBase
);
CChangesDrawingsAddPathCommand
.
prototype
.
Undo
=
function
(){
CChangesDrawingsAddPathCommand
.
prototype
.
Undo
=
function
(){
this
.
Class
.
ArrPathCommandInfo
.
splice
(
this
.
Index
,
1
);
if
(
this
.
bReverse
){
this
.
Class
.
ArrPathCommandInfo
.
splice
(
this
.
Index
,
0
,
this
.
Command
);
}
else
{
this
.
Class
.
ArrPathCommandInfo
.
splice
(
this
.
Index
,
1
);
}
};
};
CChangesDrawingsAddPathCommand
.
prototype
.
Redo
=
function
(){
CChangesDrawingsAddPathCommand
.
prototype
.
Redo
=
function
(){
this
.
Class
.
ArrPathCommandInfo
.
splice
(
this
.
Index
,
0
,
this
.
Command
);
if
(
this
.
bReverse
){
this
.
Class
.
ArrPathCommandInfo
.
splice
(
this
.
Index
,
1
);
}
else
{
this
.
Class
.
ArrPathCommandInfo
.
splice
(
this
.
Index
,
0
,
this
.
Command
);
}
};
};
CChangesDrawingsAddPathCommand
.
prototype
.
WriteToBinary
=
function
(
Writer
){
CChangesDrawingsAddPathCommand
.
prototype
.
WriteToBinary
=
function
(
Writer
){
Writer
.
WriteLong
(
this
.
Index
);
Writer
.
WriteLong
(
this
.
Index
);
Writer
.
WriteLong
(
this
.
Command
.
id
);
Writer
.
WriteLong
(
this
.
Command
.
id
);
Writer
.
WriteBool
(
!!
this
.
bReverse
);
switch
(
this
.
Command
.
id
){
switch
(
this
.
Command
.
id
){
case
moveTo
:
case
moveTo
:
case
lineTo
:
case
lineTo
:
...
@@ -125,6 +137,7 @@ AscCommon.extendClass(CChangesDrawingsAddPathCommand, AscDFH.CChangesBase);
...
@@ -125,6 +137,7 @@ AscCommon.extendClass(CChangesDrawingsAddPathCommand, AscDFH.CChangesBase);
this
.
Index
=
Reader
.
GetLong
();
this
.
Index
=
Reader
.
GetLong
();
this
.
Command
=
{};
this
.
Command
=
{};
this
.
Command
.
id
=
Reader
.
GetLong
();
this
.
Command
.
id
=
Reader
.
GetLong
();
this
.
bReverse
=
Reader
.
GetBool
();
switch
(
this
.
Command
.
id
){
switch
(
this
.
Command
.
id
){
case
moveTo
:
case
moveTo
:
case
lineTo
:
case
lineTo
:
...
...
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