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
ff1f1693
Commit
ff1f1693
authored
Jul 03, 2017
by
GoshaZotov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move function from clipboard_base into api
parent
85fa456b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
64 additions
and
52 deletions
+64
-52
common/clipboard_base.js
common/clipboard_base.js
+3
-50
word/api.js
word/api.js
+61
-2
No files found.
common/clipboard_base.js
View file @
ff1f1693
...
...
@@ -1017,62 +1017,15 @@
SpecialPasteButtonById_Show
:
function
()
{
if
(
!
this
.
Api
)
return
;
//при быстром совместном редактировании отключаем возможность специальной вставки
if
(
this
.
CheckFastCoEditing
())
{
return
;
}
var
specialPasteShowOptions
=
this
.
specialPasteButtonProps
?
this
.
specialPasteButtonProps
.
props
:
null
;
if
(
specialPasteShowOptions
&&
null
!==
this
.
showButtonIdParagraph
)
if
(
!
this
.
Api
.
asc_specialPasteShowButton
)
{
var
isUpdate
=
specialPasteShowOptions
.
cellCoord
;
var
id
=
this
.
showButtonIdParagraph
;
var
elem
=
g_oTableId
.
Get_ById
(
id
);
var
_X
,
_Y
;
if
(
elem
.
GetTargetPos
)
{
var
testPos
=
elem
.
GetTargetPos
();
var
diffX
=
0
;
var
diffY
=
0
;
if
(
testPos
.
Transform
)
{
diffX
=
testPos
.
Transform
.
tx
;
diffY
=
testPos
.
Transform
.
ty
;
}
_Y
=
testPos
.
Y
+
testPos
.
Height
+
diffY
;
_X
=
testPos
.
X
+
diffX
;
}
else
{
_Y
=
elem
.
Y
+
elem
.
AnchorPosition
.
H
;
_X
=
elem
.
X
+
elem
.
AnchorPosition
.
W
;
}
var
_PageNum
=
this
.
Api
.
WordControl
.
m_oLogicDocument
.
CurPage
;
this
.
specialPasteButtonProps
.
fixPosition
=
{
x
:
_X
,
y
:
_Y
,
pageNum
:
_PageNum
};
var
_coord
=
this
.
Api
.
WordControl
.
m_oLogicDocument
.
DrawingDocument
.
ConvertCoordsToCursorWR
(
_X
,
_Y
,
_PageNum
);
var
curCoord
=
new
AscCommon
.
asc_CRect
(
_coord
.
X
,
_coord
.
Y
,
0
,
0
);
specialPasteShowOptions
.
asc_setCellCoord
(
curCoord
);
if
(
isUpdate
)
{
specialPasteShowOptions
.
options
=
[];
this
.
Api
.
asc_UpdateSpecialPasteButton
(
specialPasteShowOptions
);
}
else
{
this
.
Api
.
asc_ShowSpecialPasteButton
(
specialPasteShowOptions
);
}
return
;
}
this
.
showButtonIdParagraph
=
null
;
this
.
Api
.
asc_specialPasteShowButton
()
;
},
SpecialPasteButton_Hide
:
function
()
...
...
word/api.js
View file @
ff1f1693
...
...
@@ -2014,7 +2014,66 @@ background-repeat: no-repeat;\
}
};
asc_docs_api
.
prototype
.
asc_ShowSpecialPasteButton
=
function
(
props
)
asc_docs_api
.
prototype
.
asc_specialPasteShowButton
=
function
()
{
var
gClipboardBase
=
window
[
'
AscCommon
'
].
g_clipboardBase
;
//при быстром совместном редактировании отключаем возможность специальной вставки
if
(
!
gClipboardBase
||
gClipboardBase
.
CheckFastCoEditing
())
{
return
;
}
var
specialPasteShowOptions
=
gClipboardBase
.
specialPasteButtonProps
?
gClipboardBase
.
specialPasteButtonProps
.
props
:
null
;
if
(
specialPasteShowOptions
&&
null
!==
this
.
showButtonIdParagraph
)
{
var
isUpdate
=
specialPasteShowOptions
.
cellCoord
;
var
id
=
gClipboardBase
.
showButtonIdParagraph
;
var
elem
=
g_oTableId
.
Get_ById
(
id
);
var
_X
,
_Y
;
if
(
elem
.
GetTargetPos
)
{
var
testPos
=
elem
.
GetTargetPos
();
var
diffX
=
0
;
var
diffY
=
0
;
if
(
testPos
.
Transform
)
{
diffX
=
testPos
.
Transform
.
tx
;
diffY
=
testPos
.
Transform
.
ty
;
}
_Y
=
testPos
.
Y
+
testPos
.
Height
+
diffY
;
_X
=
testPos
.
X
+
diffX
;
}
else
{
_Y
=
elem
.
Y
+
elem
.
AnchorPosition
.
H
;
_X
=
elem
.
X
+
elem
.
AnchorPosition
.
W
;
}
var
_PageNum
=
this
.
WordControl
.
m_oLogicDocument
.
CurPage
;
gClipboardBase
.
specialPasteButtonProps
.
fixPosition
=
{
x
:
_X
,
y
:
_Y
,
pageNum
:
_PageNum
};
var
_coord
=
this
.
WordControl
.
m_oLogicDocument
.
DrawingDocument
.
ConvertCoordsToCursorWR
(
_X
,
_Y
,
_PageNum
);
var
curCoord
=
new
AscCommon
.
asc_CRect
(
_coord
.
X
,
_coord
.
Y
,
0
,
0
);
specialPasteShowOptions
.
asc_setCellCoord
(
curCoord
);
if
(
isUpdate
)
{
specialPasteShowOptions
.
options
=
[];
this
.
asc_UpdateSpecialPasteButton
(
specialPasteShowOptions
);
}
else
{
this
.
asc_ShowSpecialPasteButton
(
specialPasteShowOptions
);
}
}
gClipboardBase
.
showButtonIdParagraph
=
null
;
};
asc_docs_api
.
prototype
.
asc_ShowSpecialPasteButton
=
function
(
props
)
{
this
.
sendEvent
(
"
asc_onShowSpecialPasteOptions
"
,
props
);
};
...
...
@@ -6552,7 +6611,7 @@ background-repeat: no-repeat;\
if
(
isViewMode
)
{
this
.
asc_SpellCheckDisconnect
();
this
.
ShowParaMarks
=
false
;
AscCommon
.
CollaborativeEditing
.
Set_GlobalLock
(
true
);
//this.isShowTableEmptyLine = false;
...
...
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