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
dec0c785
Commit
dec0c785
authored
Jun 08, 2017
by
SergeyLuzyanin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix Bug 35062
parent
249a7668
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
14 deletions
+49
-14
common/Drawings/Format/Image.js
common/Drawings/Format/Image.js
+28
-10
common/Drawings/Format/Shape.js
common/Drawings/Format/Shape.js
+3
-2
common/Drawings/TrackObjects/AdjustmentTracks.js
common/Drawings/TrackObjects/AdjustmentTracks.js
+18
-2
No files found.
common/Drawings/Format/Image.js
View file @
dec0c785
...
...
@@ -569,10 +569,28 @@ CImageShape.prototype.Refresh_RecalcData = function(data)
CImageShape
.
prototype
.
recalculateGeometry
=
function
()
{
if
(
isRealObject
(
this
.
spPr
.
geometry
))
this
.
calcGeometry
=
null
;
if
(
isRealObject
(
this
.
spPr
.
geometry
)){
this
.
calcGeometry
=
this
.
spPr
.
geometry
;
}
else
{
var
hierarchy
=
this
.
getHierarchy
();
for
(
var
i
=
0
;
i
<
hierarchy
.
length
;
++
i
){
if
(
hierarchy
[
i
]
&&
hierarchy
[
i
].
spPr
&&
hierarchy
[
i
].
spPr
.
geometry
){
var
_g
=
hierarchy
[
i
].
spPr
.
geometry
;
this
.
calcGeometry
=
AscFormat
.
ExecuteNoHistory
(
function
(){
var
_r
=
_g
.
createDuplicate
();
_r
.
setParent
(
this
);
return
_r
;
},
this
,
[]);
break
;
}
}
}
if
(
isRealObject
(
this
.
calcGeometry
))
{
var
transform
=
this
.
getTransform
();
this
.
spPr
.
g
eometry
.
Recalculate
(
transform
.
extX
,
transform
.
extY
);
this
.
calcG
eometry
.
Recalculate
(
transform
.
extX
,
transform
.
extY
);
}
};
...
...
@@ -614,8 +632,8 @@ CImageShape.prototype.draw = function(graphics, transform)
var
shape_drawer
=
new
AscCommon
.
CShapeDrawer
();
if
(
this
.
getObjectType
()
!==
AscDFH
.
historyitem_type_OleObject
&&
(
this
.
pen
||
this
.
brush
))
{
shape_drawer
.
fromShape2
(
this
,
graphics
,
this
.
spPr
.
g
eometry
);
shape_drawer
.
draw
(
this
.
spPr
.
g
eometry
);
shape_drawer
.
fromShape2
(
this
,
graphics
,
this
.
calcG
eometry
);
shape_drawer
.
draw
(
this
.
calcG
eometry
);
shape_drawer
.
Clear
();
}
var
oldBrush
=
this
.
brush
;
...
...
@@ -625,8 +643,8 @@ CImageShape.prototype.draw = function(graphics, transform)
this
.
brush
.
fill
=
this
.
blipFill
;
this
.
pen
=
null
;
shape_drawer
.
fromShape2
(
this
,
graphics
,
this
.
spPr
.
g
eometry
);
shape_drawer
.
draw
(
this
.
spPr
.
g
eometry
);
shape_drawer
.
fromShape2
(
this
,
graphics
,
this
.
calcG
eometry
);
shape_drawer
.
draw
(
this
.
calcG
eometry
);
this
.
brush
=
oldBrush
;
this
.
pen
=
oldPen
;
...
...
@@ -683,12 +701,12 @@ CImageShape.prototype.deselect = function(drawingObjectsController)
CImageShape
.
prototype
.
drawAdjustments
=
function
(
drawingDocument
)
{
if
(
this
.
calcGeometry
)
{
this
.
calcGeometry
.
drawAdjustments
(
drawingDocument
,
this
.
transform
,
false
);
}
};
CImageShape
.
prototype
.
hitToAdjustment
=
function
()
{
return
{
hit
:
false
};
};
CImageShape
.
prototype
.
hitToAdjustment
=
CShape
.
prototype
.
hitToAdjustment
;
CImageShape
.
prototype
.
getPlaceholderType
=
function
()
{
...
...
common/Drawings/Format/Shape.js
View file @
dec0c785
...
...
@@ -4871,12 +4871,13 @@ CShape.prototype.hitToAdjustment = function (x, y) {
var
t_x
,
t_y
,
ret
;
t_x
=
invert_transform
.
TransformPointX
(
x
,
y
);
t_y
=
invert_transform
.
TransformPointY
(
x
,
y
);
if
(
this
.
spPr
&&
isRealObject
(
this
.
spPr
.
geometry
))
var
_calcGeoem
=
this
.
calcGeometry
||
(
this
.
spPr
&&
this
.
spPr
.
geometry
);
if
(
_calcGeoem
)
{
invert_transform
=
this
.
getInvertTransform
();
t_x
=
invert_transform
.
TransformPointX
(
x
,
y
);
t_y
=
invert_transform
.
TransformPointY
(
x
,
y
);
ret
=
this
.
spPr
.
geometry
.
hitToAdj
(
t_x
,
t_y
,
this
.
convertPixToMM
(
global_mouseEvent
.
KoefPixToMM
*
AscCommon
.
TRACK_CIRCLE_RADIUS
));
ret
=
_calcGeoem
.
hitToAdj
(
t_x
,
t_y
,
this
.
convertPixToMM
(
global_mouseEvent
.
KoefPixToMM
*
AscCommon
.
TRACK_CIRCLE_RADIUS
));
if
(
ret
.
hit
)
{
ret
.
warp
=
false
;
...
...
common/Drawings/TrackObjects/AdjustmentTracks.js
View file @
dec0c785
...
...
@@ -42,7 +42,12 @@ function XYAdjustmentTrack(originalShape, adjIndex, bTextWarp)
var
oPen
,
oBrush
;
if
(
bTextWarp
!==
true
)
{
this
.
geometry
=
originalShape
.
spPr
.
geometry
.
createDuplicate
();
if
(
originalShape
.
spPr
&&
originalShape
.
spPr
.
geometry
){
this
.
geometry
=
originalShape
.
spPr
.
geometry
.
createDuplicate
();
}
else
if
(
originalShape
.
calcGeometry
){
this
.
geometry
=
originalShape
.
calcGeometry
.
createDuplicate
();
}
this
.
shapeWidth
=
originalShape
.
extX
;
this
.
shapeHeight
=
originalShape
.
extY
;
this
.
transform
=
originalShape
.
transform
.
CreateDublicate
();
...
...
@@ -251,6 +256,9 @@ XYAdjustmentTrack.prototype.trackEnd = function()
var
oGeometryToSet
;
if
(
!
this
.
bTextWarp
)
{
if
(
!
this
.
originalShape
.
spPr
.
geometry
){
this
.
originalShape
.
spPr
.
setGeometry
(
this
.
geometry
.
createDuplicate
());
}
oGeometryToSet
=
this
.
originalShape
.
spPr
.
geometry
;
if
(
this
.
xFlag
)
{
...
...
@@ -303,7 +311,12 @@ function PolarAdjustmentTrack(originalShape, adjIndex, bTextWarp)
var
oPen
,
oBrush
;
if
(
bTextWarp
!==
true
)
{
this
.
geometry
=
originalShape
.
spPr
.
geometry
.
createDuplicate
();
if
(
originalShape
.
spPr
&&
originalShape
.
spPr
.
geometry
){
this
.
geometry
=
originalShape
.
spPr
.
geometry
.
createDuplicate
();
}
else
if
(
originalShape
.
calcGeometry
){
this
.
geometry
=
originalShape
.
calcGeometry
.
createDuplicate
();
}
this
.
shapeWidth
=
originalShape
.
extX
;
this
.
shapeHeight
=
originalShape
.
extY
;
this
.
transform
=
originalShape
.
transform
;
...
...
@@ -449,6 +462,9 @@ function PolarAdjustmentTrack(originalShape, adjIndex, bTextWarp)
var
oGeometryToSet
;
if
(
!
this
.
bTextWarp
)
{
if
(
!
this
.
originalShape
.
spPr
.
geometry
){
this
.
originalShape
.
spPr
.
setGeometry
(
this
.
geometry
.
createDuplicate
());
}
oGeometryToSet
=
this
.
originalShape
.
spPr
.
geometry
;
if
(
this
.
radiusFlag
)
{
...
...
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