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
f7e8076a
Commit
f7e8076a
authored
Jun 02, 2017
by
SergeyLuzyanin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
replace isPointInDrawingObjects to IsInDrawingObject
parent
ad79ceeb
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
9 deletions
+30
-9
word/Editor/Document.js
word/Editor/Document.js
+5
-5
word/Editor/DocumentContent.js
word/Editor/DocumentContent.js
+3
-3
word/Editor/GraphicObjects/GraphicObjects.js
word/Editor/GraphicObjects/GraphicObjects.js
+22
-1
No files found.
word/Editor/Document.js
View file @
f7e8076a
...
@@ -5062,7 +5062,7 @@ CDocument.prototype.Selection_SetStart = function(X, Y, MouseEvent)
...
@@ -5062,7 +5062,7 @@ CDocument.prototype.Selection_SetStart = function(X, Y, MouseEvent)
var
bInText
=
(
null
===
this
.
IsInText
(
X
,
Y
,
this
.
CurPage
)
?
false
:
true
);
var
bInText
=
(
null
===
this
.
IsInText
(
X
,
Y
,
this
.
CurPage
)
?
false
:
true
);
var
bTableBorder
=
(
null
===
this
.
IsTableBorder
(
X
,
Y
,
this
.
CurPage
)
?
false
:
true
);
var
bTableBorder
=
(
null
===
this
.
IsTableBorder
(
X
,
Y
,
this
.
CurPage
)
?
false
:
true
);
var
nInDrawing
=
this
.
DrawingObjects
.
isPointInDrawingObjects
(
X
,
Y
,
this
.
CurPage
,
this
);
var
nInDrawing
=
this
.
DrawingObjects
.
IsInDrawingObject
(
X
,
Y
,
this
.
CurPage
,
this
);
var
bFlowTable
=
(
null
===
this
.
DrawingObjects
.
getTableByXY
(
X
,
Y
,
this
.
CurPage
,
this
)
?
false
:
true
);
var
bFlowTable
=
(
null
===
this
.
DrawingObjects
.
getTableByXY
(
X
,
Y
,
this
.
CurPage
,
this
)
?
false
:
true
);
// Сначала посмотрим, попалили мы в текстовый селект (но при этом не в границу таблицы и не более чем одинарным кликом)
// Сначала посмотрим, попалили мы в текстовый селект (но при этом не в границу таблицы и не более чем одинарным кликом)
...
@@ -6002,7 +6002,7 @@ CDocument.prototype.IsTableBorder = function(X, Y, PageIndex)
...
@@ -6002,7 +6002,7 @@ CDocument.prototype.IsTableBorder = function(X, Y, PageIndex)
}
}
else
else
{
{
if
(
-
1
!=
this
.
DrawingObjects
.
isPointInDrawingObjects
(
X
,
Y
,
PageIndex
,
this
))
if
(
-
1
!=
this
.
DrawingObjects
.
IsInDrawingObject
(
X
,
Y
,
PageIndex
,
this
))
{
{
return
null
;
return
null
;
}
}
...
@@ -6070,7 +6070,7 @@ CDocument.prototype.IsInDrawing = function(X, Y, PageIndex)
...
@@ -6070,7 +6070,7 @@ CDocument.prototype.IsInDrawing = function(X, Y, PageIndex)
}
}
else
else
{
{
if
(
-
1
!=
this
.
DrawingObjects
.
isPointInDrawingObjects
(
X
,
Y
,
this
.
CurPage
,
this
))
if
(
-
1
!=
this
.
DrawingObjects
.
IsInDrawingObject
(
X
,
Y
,
this
.
CurPage
,
this
))
{
{
return
true
;
return
true
;
}
}
...
@@ -7177,7 +7177,7 @@ CDocument.prototype.OnMouseUp = function(e, X, Y, PageIndex)
...
@@ -7177,7 +7177,7 @@ CDocument.prototype.OnMouseUp = function(e, X, Y, PageIndex)
// Сначала проверим попадание в Flow-таблицы и автофигуры
// Сначала проверим попадание в Flow-таблицы и автофигуры
var
pFlowTable
=
this
.
DrawingObjects
.
getTableByXY
(
X
,
Y
,
PageIndex
,
this
);
var
pFlowTable
=
this
.
DrawingObjects
.
getTableByXY
(
X
,
Y
,
PageIndex
,
this
);
var
nInDrawing
=
this
.
DrawingObjects
.
isPointInDrawingObjects
(
X
,
Y
,
PageIndex
,
this
);
var
nInDrawing
=
this
.
DrawingObjects
.
IsInDrawingObject
(
X
,
Y
,
PageIndex
,
this
);
if
(
docpostype_HdrFtr
!=
this
.
CurPos
.
Type
&&
-
1
===
nInDrawing
&&
null
===
pFlowTable
)
if
(
docpostype_HdrFtr
!=
this
.
CurPos
.
Type
&&
-
1
===
nInDrawing
&&
null
===
pFlowTable
)
{
{
...
@@ -7423,7 +7423,7 @@ CDocument.prototype.Get_NearestPos = function(PageNum, X, Y, bAnchor, Drawing)
...
@@ -7423,7 +7423,7 @@ CDocument.prototype.Get_NearestPos = function(PageNum, X, Y, bAnchor, Drawing)
return
this
.
HdrFtr
.
Get_NearestPos
(
PageNum
,
X
,
Y
,
bAnchor
,
Drawing
);
return
this
.
HdrFtr
.
Get_NearestPos
(
PageNum
,
X
,
Y
,
bAnchor
,
Drawing
);
var
bInText
=
(
null
===
this
.
IsInText
(
X
,
Y
,
PageNum
)
?
false
:
true
);
var
bInText
=
(
null
===
this
.
IsInText
(
X
,
Y
,
PageNum
)
?
false
:
true
);
var
nInDrawing
=
this
.
DrawingObjects
.
isPointInDrawingObjects
(
X
,
Y
,
PageNum
,
this
);
var
nInDrawing
=
this
.
DrawingObjects
.
IsInDrawingObject
(
X
,
Y
,
PageNum
,
this
);
if
(
true
!=
bAnchor
)
if
(
true
!=
bAnchor
)
{
{
...
...
word/Editor/DocumentContent.js
View file @
f7e8076a
...
@@ -434,7 +434,7 @@ CDocumentContent.prototype.Get_NearestPos = function(CurPage, X, Y, bAnchor, Dra
...
@@ -434,7 +434,7 @@ CDocumentContent.prototype.Get_NearestPos = function(CurPage, X, Y, bAnchor, Dra
if
(
this
.
Parent
&&
this
.
Parent
instanceof
CHeaderFooter
)
if
(
this
.
Parent
&&
this
.
Parent
instanceof
CHeaderFooter
)
{
{
var
bInText
=
(
null
===
this
.
IsInText
(
X
,
Y
,
CurPage
)
?
false
:
true
);
var
bInText
=
(
null
===
this
.
IsInText
(
X
,
Y
,
CurPage
)
?
false
:
true
);
var
nInDrawing
=
this
.
LogicDocument
.
DrawingObjects
.
isPointInDrawingObjects
(
X
,
Y
,
PageAbs
,
this
);
var
nInDrawing
=
this
.
LogicDocument
.
DrawingObjects
.
IsInDrawingObject
(
X
,
Y
,
PageAbs
,
this
);
if
(
true
!=
bAnchor
)
if
(
true
!=
bAnchor
)
{
{
...
@@ -1646,7 +1646,7 @@ CDocumentContent.prototype.IsInText = function(X, Y, CurPage)
...
@@ -1646,7 +1646,7 @@ CDocumentContent.prototype.IsInText = function(X, Y, CurPage)
};
};
CDocumentContent
.
prototype
.
IsInDrawing
=
function
(
X
,
Y
,
CurPage
)
CDocumentContent
.
prototype
.
IsInDrawing
=
function
(
X
,
Y
,
CurPage
)
{
{
if
(
-
1
!=
this
.
DrawingObjects
.
isPointInDrawingObjects
(
X
,
Y
,
this
.
Get_AbsolutePage
(
CurPage
),
this
))
if
(
-
1
!=
this
.
DrawingObjects
.
IsInDrawingObject
(
X
,
Y
,
this
.
Get_AbsolutePage
(
CurPage
),
this
))
{
{
return
true
;
return
true
;
}
}
...
@@ -6381,7 +6381,7 @@ CDocumentContent.prototype.Selection_SetStart = function(X, Y, CurPage, MouseEve
...
@@ -6381,7 +6381,7 @@ CDocumentContent.prototype.Selection_SetStart = function(X, Y, CurPage, MouseEve
// Сначала проверим, не попали ли мы в один из "плавающих" объектов
// Сначала проверим, не попали ли мы в один из "плавающих" объектов
var
bInText
=
(
null
===
this
.
IsInText
(
X
,
Y
,
AbsPage
)
?
false
:
true
);
var
bInText
=
(
null
===
this
.
IsInText
(
X
,
Y
,
AbsPage
)
?
false
:
true
);
var
bTableBorder
=
(
null
===
this
.
IsTableBorder
(
X
,
Y
,
AbsPage
)
?
false
:
true
);
var
bTableBorder
=
(
null
===
this
.
IsTableBorder
(
X
,
Y
,
AbsPage
)
?
false
:
true
);
var
nInDrawing
=
this
.
LogicDocument
&&
this
.
LogicDocument
.
DrawingObjects
.
isPointInDrawingObjects
(
X
,
Y
,
AbsPage
,
this
);
var
nInDrawing
=
this
.
LogicDocument
&&
this
.
LogicDocument
.
DrawingObjects
.
IsInDrawingObject
(
X
,
Y
,
AbsPage
,
this
);
if
(
this
.
Parent
instanceof
CHeaderFooter
&&
(
nInDrawing
===
DRAWING_ARRAY_TYPE_BEFORE
||
nInDrawing
===
DRAWING_ARRAY_TYPE_INLINE
||
(
false
===
bTableBorder
&&
false
===
bInText
&&
nInDrawing
>=
0
)
))
if
(
this
.
Parent
instanceof
CHeaderFooter
&&
(
nInDrawing
===
DRAWING_ARRAY_TYPE_BEFORE
||
nInDrawing
===
DRAWING_ARRAY_TYPE_INLINE
||
(
false
===
bTableBorder
&&
false
===
bInText
&&
nInDrawing
>=
0
)
))
{
{
...
...
word/Editor/GraphicObjects/GraphicObjects.js
View file @
f7e8076a
...
@@ -3010,6 +3010,27 @@ CGraphicObjects.prototype =
...
@@ -3010,6 +3010,27 @@ CGraphicObjects.prototype =
return
this
.
maximalGraphicObjectZIndex
;
return
this
.
maximalGraphicObjectZIndex
;
},
},
IsInDrawingObject
:
function
(
X
,
Y
,
nPageIndex
,
oContent
){
var
_X
,
_Y
,
oTransform
,
oInvertTransform
;
if
(
oContent
){
oTransform
=
oContent
.
Get_ParentTextTransform
();
if
(
oTransform
){
oInvertTransform
=
AscCommon
.
global_MatrixTransformer
.
Invert
(
oTransform
);
_X
=
oInvertTransform
.
TransformPointX
(
X
,
Y
);
_Y
=
oInvertTransform
.
TransformPointY
(
X
,
Y
);
}
else
{
_X
=
X
;
_Y
=
Y
;
}
}
else
{
_X
=
X
;
_Y
=
Y
;
}
return
this
.
isPointInDrawingObjects
(
_X
,
_Y
,
nPageIndex
);
},
isPointInDrawingObjects
:
function
(
x
,
y
,
pageIndex
,
bSelected
,
bNoText
)
isPointInDrawingObjects
:
function
(
x
,
y
,
pageIndex
,
bSelected
,
bNoText
)
{
{
var
ret
;
var
ret
;
...
...
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