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
9d8022ad
Commit
9d8022ad
authored
Mar 31, 2017
by
Sergey Luzyanin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix Bug 34601
parent
e781d043
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
12 deletions
+20
-12
word/Editor/Paragraph/ParaDrawing.js
word/Editor/Paragraph/ParaDrawing.js
+20
-12
No files found.
word/Editor/Paragraph/ParaDrawing.js
View file @
9d8022ad
...
...
@@ -738,7 +738,7 @@ ParaDrawing.prototype.Set_Props = function(Props)
{
if
(
isRealObject
(
this
.
GraphicObj
.
bounds
)
&&
AscFormat
.
isRealNumber
(
this
.
GraphicObj
.
bounds
.
w
)
&&
AscFormat
.
isRealNumber
(
this
.
GraphicObj
.
bounds
.
h
))
{
this
.
setExtent
(
this
.
GraphicObj
.
bounds
.
w
,
this
.
GraphicObj
.
bounds
.
h
);
this
.
CheckWH
(
);
}
}
if
(
c_oAscWrapStyle2
.
Behind
===
Props
.
WrappingStyle
||
c_oAscWrapStyle2
.
InFront
===
Props
.
WrappingStyle
)
...
...
@@ -1125,7 +1125,7 @@ ParaDrawing.prototype.Update_Position = function(Paragraph, ParaLayout, PageLimi
else
H
=
this
.
getXfrmExtY
();
}
this
.
Internal_Position
.
Set
(
W
,
H
,
this
.
YOffset
,
ParaLayout
,
PageLimitsOrigin
);
this
.
Internal_Position
.
Set
(
W
,
H
,
this
.
YOffset
,
ParaLayout
,
PageLimitsOrigin
,
this
.
GraphicObj
.
bounds
.
l
,
this
.
GraphicObj
.
bounds
.
t
,
this
.
GraphicObj
.
bounds
.
w
,
this
.
GraphicObj
.
bounds
.
h
);
this
.
Internal_Position
.
Calculate_X
(
bInline
,
this
.
PositionH
.
RelativeFrom
,
this
.
PositionH
.
Align
,
this
.
PositionH
.
Value
,
this
.
PositionH
.
Percent
);
this
.
Internal_Position
.
Calculate_Y
(
bInline
,
this
.
PositionV
.
RelativeFrom
,
this
.
PositionV
.
Align
,
this
.
PositionV
.
Value
,
this
.
PositionV
.
Percent
);
this
.
Internal_Position
.
Correct_Values
(
bInline
,
PageLimits
,
this
.
AllowOverlap
,
this
.
Use_TextWrap
(),
OtherFlowObjects
);
...
...
@@ -1330,7 +1330,7 @@ ParaDrawing.prototype.private_SetXYByLayout = function(X, Y, PageNum, Layout, bC
var
_W
=
(
this
.
PositionH
.
Align
?
this
.
Extent
.
W
:
this
.
getXfrmExtX
()
);
var
_H
=
(
this
.
PositionV
.
Align
?
this
.
Extent
.
H
:
this
.
getXfrmExtY
()
);
this
.
Internal_Position
.
Set
(
_W
,
_H
,
this
.
YOffset
,
Layout
.
ParagraphLayout
,
Layout
.
PageLimitsOrigin
);
this
.
Internal_Position
.
Set
(
_W
,
_H
,
this
.
YOffset
,
Layout
.
ParagraphLayout
,
Layout
.
PageLimitsOrigin
,
this
.
GraphicObj
.
bounds
.
l
,
this
.
GraphicObj
.
bounds
.
t
,
this
.
GraphicObj
.
bounds
.
w
,
this
.
GraphicObj
.
bounds
.
h
);
this
.
Internal_Position
.
Calculate_X
(
false
,
c_oAscRelativeFromH
.
Page
,
false
,
X
-
Layout
.
PageLimitsOrigin
.
X
,
false
);
this
.
Internal_Position
.
Calculate_Y
(
false
,
c_oAscRelativeFromV
.
Page
,
false
,
Y
-
Layout
.
PageLimitsOrigin
.
Y
,
false
);
this
.
Internal_Position
.
Correct_Values
(
false
,
Layout
.
PageLimits
,
this
.
AllowOverlap
,
this
.
Use_TextWrap
(),
[]);
...
...
@@ -2507,6 +2507,10 @@ function CAnchorPosition()
// Данные для Flow-объектов
this
.
W
=
0
;
this
.
H
=
0
;
this
.
BoundsL
=
0
;
this
.
BoundsT
=
0
;
this
.
BoundsW
=
0
;
this
.
BoundsH
=
0
;
this
.
X
=
0
;
this
.
Y
=
0
;
this
.
PageNum
=
0
;
...
...
@@ -2526,10 +2530,14 @@ function CAnchorPosition()
this
.
Page_X
=
0
;
this
.
Page_Y
=
0
;
}
CAnchorPosition
.
prototype
.
Set
=
function
(
W
,
H
,
YOffset
,
ParaLayout
,
PageLimits
)
CAnchorPosition
.
prototype
.
Set
=
function
(
W
,
H
,
YOffset
,
ParaLayout
,
PageLimits
,
BoundsL
,
BoundsT
,
BoundsW
,
BoundsH
)
{
this
.
W
=
W
;
this
.
H
=
H
;
this
.
BoundsL
=
BoundsL
;
this
.
BoundsT
=
BoundsT
;
this
.
BoundsW
=
BoundsW
;
this
.
BoundsH
=
BoundsH
;
this
.
YOffset
=
YOffset
;
...
...
@@ -3088,18 +3096,18 @@ CAnchorPosition.prototype.Correct_Values = function(bInline, PageLimits, AllowOv
if
(
true
===
UseTextWrap
)
{
// Скорректируем рассчитанную позицию, так чтобы объект не выходил за заданные пределы
if
(
CurX
+
W
>
X_max
)
CurX
=
X_max
-
W
;
if
(
CurX
+
this
.
BoundsL
+
this
.
Bounds
W
>
X_max
)
CurX
=
X_max
-
this
.
BoundsL
-
this
.
Bounds
W
;
if
(
CurX
<
X_min
)
CurX
=
X_min
;
if
(
CurX
+
this
.
BoundsL
<
X_min
)
CurX
=
X_min
-
this
.
BoundsL
;
// Скорректируем рассчитанную позицию, так чтобы объект не выходил за заданные пределы
if
(
CurY
+
H
>
Y_max
)
CurY
=
Y_max
-
H
;
if
(
CurY
+
this
.
BoundsT
+
this
.
Bounds
H
>
Y_max
)
CurY
=
Y_max
-
this
.
BoundsT
-
this
.
Bounds
H
;
if
(
CurY
<
Y_min
)
CurY
=
Y_min
;
if
(
CurY
+
this
.
BoundsT
<
Y_min
)
CurY
=
Y_min
-
this
.
BoundsT
;
}
this
.
CalcX
=
CurX
;
...
...
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