mirror of
https://github.com/ONLYOFFICE/sdkjs.git
synced 2026-04-07 14:09:12 +08:00
Merge branch 'develop' into feature/draw
# Conflicts: # common/Drawings/CommonController.js # word/Drawing/Graphics.js
This commit is contained in:
@ -250,13 +250,10 @@ if (window.native && window.native.GetDevicePixelRatio)
|
||||
window.devicePixelRatio = window.native.GetDevicePixelRatio();
|
||||
|
||||
// OPEN
|
||||
function NativeOpenFileData(data, version, xlsx_file_path, options)
|
||||
function NativeCreateApi(options)
|
||||
{
|
||||
window.NATIVE_DOCUMENT_TYPE = window.native.GetEditorType();
|
||||
Api = null;
|
||||
|
||||
if (options && options["printOptions"] && options["printOptions"]["retina"])
|
||||
AscBrowser.isRetina = true;
|
||||
Api = null;
|
||||
|
||||
var configApi = {};
|
||||
if (options && undefined !== options["translate"])
|
||||
@ -264,19 +261,25 @@ function NativeOpenFileData(data, version, xlsx_file_path, options)
|
||||
|
||||
if (window.NATIVE_DOCUMENT_TYPE === "presentation" || window.NATIVE_DOCUMENT_TYPE === "document" || window.NATIVE_DOCUMENT_TYPE === "draw")
|
||||
{
|
||||
Api = new window["Asc"]["asc_docs_api"](configApi);
|
||||
Api = new window["Asc"]["asc_docs_api"](configApi);
|
||||
if (options && options["documentLayout"] && undefined !== options["documentLayout"]["openedAt"])
|
||||
Api.setOpenedAt(options["documentLayout"]["openedAt"]);
|
||||
}
|
||||
else
|
||||
{
|
||||
Api = new window["Asc"]["spreadsheet_api"](configApi);
|
||||
Api = new window["Asc"]["spreadsheet_api"](configApi);
|
||||
}
|
||||
|
||||
if (options && undefined !== options["locale"])
|
||||
Api.asc_setLocale(options["locale"]);
|
||||
}
|
||||
|
||||
if (window.NATIVE_DOCUMENT_TYPE === "presentation" || window.NATIVE_DOCUMENT_TYPE === "document")
|
||||
function NativeOpenFileData(data, version, xlsx_file_path, options)
|
||||
{
|
||||
NativeCreateApi(options);
|
||||
|
||||
if (window.NATIVE_DOCUMENT_TYPE === "presentation" ||
|
||||
window.NATIVE_DOCUMENT_TYPE === "document")
|
||||
{
|
||||
Api.asc_nativeOpenFile(data, version);
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user