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
d184b6e0
Commit
d184b6e0
authored
Mar 31, 2017
by
Alexey.Musinov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ios collaboration
parent
9efd482e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
2 deletions
+47
-2
common/Native/Wrappers/api.js
common/Native/Wrappers/api.js
+47
-2
No files found.
common/Native/Wrappers/api.js
View file @
d184b6e0
...
...
@@ -2285,9 +2285,12 @@ Asc['asc_docs_api'].prototype["Call_Menu_Event"] = function(type, _params)
}
}
params
[
0
]
=
firstUrl
;
// _return = _s.offline_addImageDrawingObject(params);
var
_src
=
firstUrl
;
var
_w
=
_params
[
1
];
var
_h
=
_params
[
2
];
var
_pageNum
=
_params
[
3
];
this
.
AddImageUrlActionNative
(
_src
,
_w
,
_h
,
_pageNum
);
break
;
}
...
...
@@ -4802,6 +4805,48 @@ Asc['asc_docs_api'].prototype.AddImageUrlNative = function(url, _w, _h, _pageNum
this
.
AddImageToPage
(
url
,
_pageNum
,
(
_sectionPr
.
XLimit
-
wI
)
/
2
,
(
_sectionPr
.
YLimit
-
hI
)
/
2
,
wI
,
hI
);
}
};
Asc
[
'
asc_docs_api
'
].
prototype
.
AddImageUrlActionNative
=
function
(
src
,
_w
,
_h
,
_pageNum
)
{
var
ColumnSize
=
this
.
WordControl
.
m_oLogicDocument
.
GetColumnSize
();
var
__w
=
Math
.
max
((
_w
*
AscCommon
.
g_dKoef_pix_to_mm
),
1
);
var
__h
=
Math
.
max
((
_h
*
AscCommon
.
g_dKoef_pix_to_mm
),
1
);
_w
=
Math
.
max
(
5
,
Math
.
min
(
_w
,
__w
));
_h
=
Math
.
max
(
5
,
Math
.
min
((
_w
*
__h
/
__w
)));
if
(
this
.
isShapeImageChangeUrl
)
{
var
AscShapeProp
=
new
Asc
.
asc_CShapeProperty
();
AscShapeProp
.
fill
=
new
Asc
.
asc_CShapeFill
();
AscShapeProp
.
fill
.
type
=
c_oAscFill
.
FILL_TYPE_BLIP
;
AscShapeProp
.
fill
.
fill
=
new
Asc
.
asc_CFillBlip
();
AscShapeProp
.
fill
.
fill
.
asc_putUrl
(
src
);
this
.
ImgApply
(
new
Asc
.
asc_CImgProperty
({
ShapeProperties
:
AscShapeProp
}));
this
.
isShapeImageChangeUrl
=
false
;
}
else
if
(
this
.
isImageChangeUrl
)
{
var
AscImageProp
=
new
Asc
.
asc_CImgProperty
();
AscImageProp
.
ImageUrl
=
src
;
this
.
ImgApply
(
AscImageProp
);
this
.
isImageChangeUrl
=
false
;
}
else
{
if
(
false
===
this
.
WordControl
.
m_oLogicDocument
.
Document_Is_SelectionLocked
(
changestype_Paragraph_Content
))
{
var
imageLocal
=
AscCommon
.
g_oDocumentUrls
.
getImageLocal
(
src
);
if
(
imageLocal
)
{
src
=
imageLocal
;
}
this
.
WordControl
.
m_oLogicDocument
.
Create_NewHistoryPoint
(
AscDFH
.
historydescription_Document_AddImageUrlLong
);
//if (undefined === imgProp || undefined === imgProp.WrappingStyle || 0 == imgProp.WrappingStyle)
this
.
WordControl
.
m_oLogicDocument
.
Add_InlineImage
(
_w
,
_h
,
src
);
//else
// this.WordControl.m_oLogicDocument.Add_InlineImage(_w, _h, src, null, true);
}
}
};
Asc
[
'
asc_docs_api
'
].
prototype
.
Send_Menu_Event
=
function
(
type
)
{
...
...
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