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
28295951
Commit
28295951
authored
Jun 24, 2016
by
Ilya Kirillov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Исправлены баги при селекте разных сносок.
parent
a981c286
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
6 deletions
+22
-6
word/Editor/Footnotes.js
word/Editor/Footnotes.js
+22
-6
No files found.
word/Editor/Footnotes.js
View file @
28295951
...
@@ -327,6 +327,11 @@ CFootnotesController.prototype.StartSelection = function(X, Y, PageAbs, MouseEve
...
@@ -327,6 +327,11 @@ CFootnotesController.prototype.StartSelection = function(X, Y, PageAbs, MouseEve
PageAbs
:
PageAbs
,
PageAbs
:
PageAbs
,
MouseEvent
:
MouseEvent
MouseEvent
:
MouseEvent
};
};
this
.
CurFootnote
=
this
.
Selection
.
Start
.
Footnote
;
this
.
Selection
.
Footnotes
=
{};
this
.
Selection
.
Footnotes
[
this
.
Selection
.
Start
.
Footnote
.
Get_Id
()]
=
this
.
Selection
.
Start
.
Footnote
;
};
};
CFootnotesController
.
prototype
.
EndSelection
=
function
(
X
,
Y
,
PageAbs
,
MouseEvent
)
CFootnotesController
.
prototype
.
EndSelection
=
function
(
X
,
Y
,
PageAbs
,
MouseEvent
)
{
{
...
@@ -345,6 +350,7 @@ CFootnotesController.prototype.EndSelection = function(X, Y, PageAbs, MouseEvent
...
@@ -345,6 +350,7 @@ CFootnotesController.prototype.EndSelection = function(X, Y, PageAbs, MouseEvent
PageAbs
:
PageAbs
,
PageAbs
:
PageAbs
,
MouseEvent
:
MouseEvent
MouseEvent
:
MouseEvent
};
};
this
.
CurFootnote
=
this
.
Selection
.
End
.
Footnote
;
var
sStartId
=
this
.
Selection
.
Start
.
Footnote
.
Get_Id
();
var
sStartId
=
this
.
Selection
.
Start
.
Footnote
.
Get_Id
();
var
sEndId
=
this
.
Selection
.
End
.
Footnote
.
Get_Id
();
var
sEndId
=
this
.
Selection
.
End
.
Footnote
.
Get_Id
();
...
@@ -359,12 +365,18 @@ CFootnotesController.prototype.EndSelection = function(X, Y, PageAbs, MouseEvent
...
@@ -359,12 +365,18 @@ CFootnotesController.prototype.EndSelection = function(X, Y, PageAbs, MouseEvent
// Новый селект
// Новый селект
if
(
this
.
Selection
.
Start
.
Footnote
!==
this
.
Selection
.
End
.
Footnote
)
if
(
this
.
Selection
.
Start
.
Footnote
!==
this
.
Selection
.
End
.
Footnote
)
{
{
this
.
Selection
.
Start
.
Footnote
.
Selection_SetEnd
(
X
,
Y
,
0
,
MouseEvent
);
if
(
this
.
Selection
.
Start
.
Page
>
this
.
Selection
.
EndPage
||
this
.
Selection
.
Start
.
Index
>
this
.
Selection
.
End
.
Index
)
this
.
Selection
.
End
.
Footnote
.
Selection_SetStart
(
this
.
Selection
.
Start
.
Pos
.
X
,
this
.
Selection
.
Start
.
Pos
.
Y
,
0
,
this
.
Selection
.
Start
.
Pos
.
MouseEvent
);
{
this
.
Selection
.
Start
.
Footnote
.
Selection_SetEnd
(
-
MEASUREMENT_MAX_MM_VALUE
,
-
MEASUREMENT_MAX_MM_VALUE
,
0
,
MouseEvent
);
this
.
Selection
.
End
.
Footnote
.
Selection_SetStart
(
MEASUREMENT_MAX_MM_VALUE
,
MEASUREMENT_MAX_MM_VALUE
,
0
,
this
.
Selection
.
Start
.
Pos
.
MouseEvent
);
}
else
{
this
.
Selection
.
Start
.
Footnote
.
Selection_SetEnd
(
MEASUREMENT_MAX_MM_VALUE
,
MEASUREMENT_MAX_MM_VALUE
,
0
,
MouseEvent
);
this
.
Selection
.
End
.
Footnote
.
Selection_SetStart
(
-
MEASUREMENT_MAX_MM_VALUE
,
-
MEASUREMENT_MAX_MM_VALUE
,
0
,
this
.
Selection
.
Start
.
Pos
.
MouseEvent
);
}
this
.
Selection
.
End
.
Footnote
.
Selection_SetEnd
(
X
,
Y
,
0
,
MouseEvent
);
this
.
Selection
.
End
.
Footnote
.
Selection_SetEnd
(
X
,
Y
,
0
,
MouseEvent
);
this
.
CurFootnote
=
this
.
Selection
.
End
.
Footnote
;
var
oRange
=
this
.
private_GetFootnotesRange
(
this
.
Selection
.
Start
,
this
.
Selection
.
End
);
var
oRange
=
this
.
private_GetFootnotesRange
(
this
.
Selection
.
Start
,
this
.
Selection
.
End
);
for
(
var
sFootnoteId
in
oRange
)
for
(
var
sFootnoteId
in
oRange
)
{
{
...
@@ -392,12 +404,12 @@ CFootnotesController.prototype.private_GetFootnoteOnPageByXY = function(X, Y, Pa
...
@@ -392,12 +404,12 @@ CFootnotesController.prototype.private_GetFootnoteOnPageByXY = function(X, Y, Pa
return
null
;
return
null
;
var
Page
=
this
.
Pages
[
PageAbs
];
var
Page
=
this
.
Pages
[
PageAbs
];
for
(
var
nIndex
=
0
;
nIndex
<
Page
.
Elements
.
length
;
++
nIndex
)
for
(
var
nIndex
=
Page
.
Elements
.
length
-
1
;
nIndex
>=
0
;
--
nIndex
)
{
{
var
Footnote
=
Page
.
Elements
[
nIndex
];
var
Footnote
=
Page
.
Elements
[
nIndex
];
var
Bounds
=
Footnote
.
Get_PageBounds
(
0
);
var
Bounds
=
Footnote
.
Get_PageBounds
(
0
);
if
(
Bounds
.
Top
<=
Y
)
if
(
Bounds
.
Top
<=
Y
||
0
===
nIndex
)
return
{
return
{
Footnote
:
Footnote
,
Footnote
:
Footnote
,
Index
:
nIndex
,
Index
:
nIndex
,
...
@@ -405,6 +417,8 @@ CFootnotesController.prototype.private_GetFootnoteOnPageByXY = function(X, Y, Pa
...
@@ -405,6 +417,8 @@ CFootnotesController.prototype.private_GetFootnoteOnPageByXY = function(X, Y, Pa
};
};
}
}
return
null
;
return
null
;
};
};
CFootnotesController
.
prototype
.
private_GetFootnoteByXY
=
function
(
X
,
Y
,
PageAbs
)
CFootnotesController
.
prototype
.
private_GetFootnoteByXY
=
function
(
X
,
Y
,
PageAbs
)
...
@@ -463,6 +477,8 @@ CFootnotesController.prototype.private_GetFootnotesRange = function(Start, End)
...
@@ -463,6 +477,8 @@ CFootnotesController.prototype.private_GetFootnotesRange = function(Start, End)
this
.
private_GetFootnotesOnPage
(
End
.
Page
,
-
1
,
End
.
Index
,
oResult
);
this
.
private_GetFootnotesOnPage
(
End
.
Page
,
-
1
,
End
.
Index
,
oResult
);
}
}
return
oResult
;
};
};
CFootnotesController
.
prototype
.
private_GetFootnotesOnPage
=
function
(
PageAbs
,
StartIndex
,
EndIndex
,
oFootnotes
)
CFootnotesController
.
prototype
.
private_GetFootnotesOnPage
=
function
(
PageAbs
,
StartIndex
,
EndIndex
,
oFootnotes
)
{
{
...
...
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