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
b9bbf300
Commit
b9bbf300
authored
Feb 02, 2017
by
Alexey.Musinov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ios cell styles load
parent
8a9b92f1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
31 deletions
+32
-31
cell/native/native.js
cell/native/native.js
+32
-31
No files found.
cell/native/native.js
View file @
b9bbf300
...
@@ -2962,7 +2962,7 @@ function OfflineEditor () {
...
@@ -2962,7 +2962,7 @@ function OfflineEditor () {
window
[
'
AscFormat
'
].
DrawingArea
.
prototype
.
drawSelection
=
function
(
drawingDocument
)
{
window
[
'
AscFormat
'
].
DrawingArea
.
prototype
.
drawSelection
=
function
(
drawingDocument
)
{
offlineEditor
.
flushTextMeasurer
();
AscCommon
.
g_oTextMeasurer
.
Flush
();
var
canvas
=
this
.
worksheet
.
objectRender
.
getDrawingCanvas
();
var
canvas
=
this
.
worksheet
.
objectRender
.
getDrawingCanvas
();
var
shapeCtx
=
canvas
.
shapeCtx
;
var
shapeCtx
=
canvas
.
shapeCtx
;
...
@@ -3376,8 +3376,6 @@ function OfflineEditor () {
...
@@ -3376,8 +3376,6 @@ function OfflineEditor () {
var
oldrange
=
this
.
visibleRange
;
var
oldrange
=
this
.
visibleRange
;
this
.
visibleRange
=
range
;
this
.
visibleRange
=
range
;
//console.log('range:' + ' c1:' + c1 + ' r1:' + r1 + ' c2:' + c2 +' r2:' + r2);
var
cellsLeft_Local
=
this
.
cellsLeft
;
var
cellsLeft_Local
=
this
.
cellsLeft
;
var
cellsTop_Local
=
this
.
cellsTop
;
var
cellsTop_Local
=
this
.
cellsTop
;
...
@@ -3391,7 +3389,7 @@ function OfflineEditor () {
...
@@ -3391,7 +3389,7 @@ function OfflineEditor () {
window
[
"
native
"
][
"
SwitchMemoryLayer
"
]();
window
[
"
native
"
][
"
SwitchMemoryLayer
"
]();
offlineEditor
.
flushTextMeasurer
();
AscCommon
.
g_oTextMeasurer
.
Flush
();
this
.
objectRender
.
showDrawingObjectsEx
(
false
);
this
.
objectRender
.
showDrawingObjectsEx
(
false
);
...
@@ -3873,7 +3871,7 @@ function OfflineEditor () {
...
@@ -3873,7 +3871,7 @@ function OfflineEditor () {
deviceScale
=
window
[
"
native
"
][
"
GetDeviceScale
"
]();
deviceScale
=
window
[
"
native
"
][
"
GetDeviceScale
"
]();
window
.
g_file_path
=
"
native_open_file
"
;
window
.
g_file_path
=
"
native_open_file
"
;
window
.
NATIVE_DOCUMENT_TYPE
=
""
;
//window["native"]["GetEditorType"]();
window
.
NATIVE_DOCUMENT_TYPE
=
""
;
_api
=
new
window
[
"
Asc
"
][
"
spreadsheet_api
"
]({});
_api
=
new
window
[
"
Asc
"
][
"
spreadsheet_api
"
]({});
var
userInfo
=
new
Asc
.
asc_CUserInfo
();
var
userInfo
=
new
Asc
.
asc_CUserInfo
();
...
@@ -3996,7 +3994,7 @@ function OfflineEditor () {
...
@@ -3996,7 +3994,7 @@ function OfflineEditor () {
_api
.
asc_registerCallback
(
"
asc_onInitEditorStyles
"
,
function
()
{
_api
.
asc_registerCallback
(
"
asc_onInitEditorStyles
"
,
function
()
{
var
stream
=
global_memory_stream_menu
;
var
stream
=
global_memory_stream_menu
;
stream
[
"
ClearNoAttack
"
]();
stream
[
"
ClearNoAttack
"
]();
window
[
"
native
"
][
"
OnCallMenuEvent
"
](
2405
,
stream
);
// ASC_SPREADSHEETS_EVENT_TYPE_
TABLE
_STYLES
window
[
"
native
"
][
"
OnCallMenuEvent
"
](
2405
,
stream
);
// ASC_SPREADSHEETS_EVENT_TYPE_
CELL
_STYLES
});
});
_api
.
asc_registerCallback
(
"
asc_onError
"
,
function
(
id
,
level
,
errData
)
{
_api
.
asc_registerCallback
(
"
asc_onError
"
,
function
(
id
,
level
,
errData
)
{
...
@@ -4761,13 +4759,6 @@ function OfflineEditor () {
...
@@ -4761,13 +4759,6 @@ function OfflineEditor () {
return
objectId
;
return
objectId
;
};
};
this
.
offline_generateStyle
=
function
()
{
// Отправка стилей ячеек
var
guiStyles
=
_api
.
wb
.
getCellStyles
();
//bResult = this.handlers.trigger("asc_onInitEditorStyles", guiStyles);
// this.guiStyles = (false === bResult) ? guiStyles : null;
};
this
.
offline_beforeInit
=
function
()
{
this
.
offline_beforeInit
=
function
()
{
// STYLE MANAGER
// STYLE MANAGER
...
@@ -5350,17 +5341,21 @@ function OfflineEditor () {
...
@@ -5350,17 +5341,21 @@ function OfflineEditor () {
}
}
};
};
this
.
offline_afteInit
=
function
()
{
window
.
AscAlwaysSaveAspectOnResizeTrack
=
true
;};
this
.
offline_afteInit
=
function
()
{
window
.
AscAlwaysSaveAspectOnResizeTrack
=
true
;};
this
.
flushTextMeasurer
=
function
()
{
AscCommon
.
g_oTextMeasurer
.
Flush
();
};
}
}
var
_s
=
new
OfflineEditor
();
var
_s
=
new
OfflineEditor
();
window
[
"
native
"
][
"
offline_of
"
]
=
function
(
arg
)
{
_s
.
openFile
(
arg
);}
window
[
"
native
"
][
"
offline_of
"
]
=
function
(
arg
)
{
_s
.
openFile
(
arg
);}
window
[
"
native
"
][
"
offline_stz
"
]
=
function
(
v
)
{
_s
.
zoom
=
v
;
_api
.
asc_setZoom
(
v
);}
window
[
"
native
"
][
"
offline_stz
"
]
=
function
(
v
)
{
_s
.
zoom
=
v
;
_api
.
asc_setZoom
(
v
);}
window
[
"
native
"
][
"
offline_ds
"
]
=
function
(
x
,
y
,
width
,
height
,
ratio
,
istoplayer
)
{
_s
.
drawSheet
(
x
,
y
,
width
,
height
,
ratio
,
istoplayer
);}
window
[
"
native
"
][
"
offline_ds
"
]
=
function
(
x
,
y
,
width
,
height
,
ratio
,
istoplayer
)
{
window
[
"
native
"
][
"
offline_dh
"
]
=
function
(
x
,
y
,
width
,
height
,
type
,
ratio
)
{
_s
.
drawHeader
(
x
,
y
,
width
,
height
,
type
,
ratio
);}
AscCommon
.
g_oTextMeasurer
.
Flush
();
_s
.
drawSheet
(
x
,
y
,
width
,
height
,
ratio
,
istoplayer
);
}
window
[
"
native
"
][
"
offline_dh
"
]
=
function
(
x
,
y
,
width
,
height
,
ratio
,
type
)
{
AscCommon
.
g_oTextMeasurer
.
Flush
();
_s
.
drawHeader
(
x
,
y
,
width
,
height
,
type
,
ratio
);
}
window
[
"
native
"
][
"
offline_mouse_down
"
]
=
function
(
x
,
y
,
pin
,
isViewerMode
,
isFormulaEditMode
,
isRangeResize
,
isChartRange
,
indexRange
,
c1
,
r1
,
c2
,
r2
,
targetCol
,
targetRow
,
select
)
{
window
[
"
native
"
][
"
offline_mouse_down
"
]
=
function
(
x
,
y
,
pin
,
isViewerMode
,
isFormulaEditMode
,
isRangeResize
,
isChartRange
,
indexRange
,
c1
,
r1
,
c2
,
r2
,
targetCol
,
targetRow
,
select
)
{
_s
.
isShapeAction
=
false
;
_s
.
isShapeAction
=
false
;
...
@@ -5938,15 +5933,15 @@ window["native"]["offline_cell_editor_mouse_event"] = function(sendEvents) {
...
@@ -5938,15 +5933,15 @@ window["native"]["offline_cell_editor_mouse_event"] = function(sendEvents) {
for
(
var
i
=
0
;
i
<
sendEvents
.
length
;
i
+=
5
)
{
for
(
var
i
=
0
;
i
<
sendEvents
.
length
;
i
+=
5
)
{
var
event
=
{
var
event
=
{
pageX
:
e
vents
[
i
+
1
],
pageX
:
sendE
vents
[
i
+
1
],
pageY
:
e
vents
[
i
+
2
],
pageY
:
sendE
vents
[
i
+
2
],
which
:
1
,
which
:
1
,
shiftKey
:
e
vents
[
i
+
3
],
shiftKey
:
sendE
vents
[
i
+
3
],
button
:
0
button
:
0
};
};
if
(
e
vents
[
i
+
3
])
{
if
(
sendE
vents
[
i
+
3
])
{
if
(
-
1
==
e
vents
[
i
+
4
])
{
if
(
-
1
==
sendE
vents
[
i
+
4
])
{
left
=
Math
.
min
(
cellEditor
.
selectionBegin
,
cellEditor
.
selectionEnd
);
left
=
Math
.
min
(
cellEditor
.
selectionBegin
,
cellEditor
.
selectionEnd
);
right
=
Math
.
max
(
cellEditor
.
selectionBegin
,
cellEditor
.
selectionEnd
);
right
=
Math
.
max
(
cellEditor
.
selectionBegin
,
cellEditor
.
selectionEnd
);
cellEditor
.
cursorPos
=
left
;
cellEditor
.
cursorPos
=
left
;
...
@@ -5956,7 +5951,7 @@ window["native"]["offline_cell_editor_mouse_event"] = function(sendEvents) {
...
@@ -5956,7 +5951,7 @@ window["native"]["offline_cell_editor_mouse_event"] = function(sendEvents) {
_s
.
textSelection
=
-
1
;
_s
.
textSelection
=
-
1
;
}
}
if
(
1
==
e
vents
[
i
+
4
])
{
if
(
1
==
sendE
vents
[
i
+
4
])
{
left
=
Math
.
min
(
cellEditor
.
selectionBegin
,
cellEditor
.
selectionEnd
);
left
=
Math
.
min
(
cellEditor
.
selectionBegin
,
cellEditor
.
selectionEnd
);
right
=
Math
.
max
(
cellEditor
.
selectionBegin
,
cellEditor
.
selectionEnd
);
right
=
Math
.
max
(
cellEditor
.
selectionBegin
,
cellEditor
.
selectionEnd
);
cellEditor
.
cursorPos
=
right
;
cellEditor
.
cursorPos
=
right
;
...
@@ -5967,7 +5962,7 @@ window["native"]["offline_cell_editor_mouse_event"] = function(sendEvents) {
...
@@ -5967,7 +5962,7 @@ window["native"]["offline_cell_editor_mouse_event"] = function(sendEvents) {
}
}
}
}
if
(
0
===
e
vents
[
i
+
0
])
{
if
(
0
===
sendE
vents
[
i
+
0
])
{
var
pos
=
cellEditor
.
cursorPos
;
var
pos
=
cellEditor
.
cursorPos
;
left
=
cellEditor
.
selectionBegin
;
left
=
cellEditor
.
selectionBegin
;
right
=
cellEditor
.
selectionEnd
;
right
=
cellEditor
.
selectionEnd
;
...
@@ -5987,14 +5982,14 @@ window["native"]["offline_cell_editor_mouse_event"] = function(sendEvents) {
...
@@ -5987,14 +5982,14 @@ window["native"]["offline_cell_editor_mouse_event"] = function(sendEvents) {
cellEditor
.
selectionEnd
=
Math
.
max
(
left
+
1
,
cellEditor
.
selectionEnd
);
cellEditor
.
selectionEnd
=
Math
.
max
(
left
+
1
,
cellEditor
.
selectionEnd
);
}
}
}
else
if
(
1
===
e
vents
[
i
+
0
])
{
}
else
if
(
1
===
sendE
vents
[
i
+
0
])
{
cellEditor
.
_onMouseUp
(
event
);
cellEditor
.
_onMouseUp
(
event
);
_s
.
textSelection
=
0
;
_s
.
textSelection
=
0
;
}
else
if
(
2
==
e
vents
[
i
+
0
])
{
}
else
if
(
2
==
sendE
vents
[
i
+
0
])
{
cellEditor
.
_onMouseMove
(
event
);
cellEditor
.
_onMouseMove
(
event
);
}
else
if
(
3
==
e
vents
[
i
+
0
])
{
}
else
if
(
3
==
sendE
vents
[
i
+
0
])
{
cellEditor
.
clickCounter
.
clickCount
=
2
;
cellEditor
.
clickCounter
.
clickCount
=
2
;
cellEditor
.
_onMouseDown
(
event
);
cellEditor
.
_onMouseDown
(
event
);
cellEditor
.
_onMouseUp
(
event
);
cellEditor
.
_onMouseUp
(
event
);
...
@@ -6382,7 +6377,7 @@ window["native"]["offline_apply_event"] = function(type,params) {
...
@@ -6382,7 +6377,7 @@ window["native"]["offline_apply_event"] = function(type,params) {
case
3
:
// ASC_MENU_EVENT_TYPE_UNDO
case
3
:
// ASC_MENU_EVENT_TYPE_UNDO
{
{
_s
.
flushTextMeasurer
();
AscCommon
.
g_oTextMeasurer
.
Flush
();
_api
.
asc_Undo
();
_api
.
asc_Undo
();
_s
.
asc_WriteAllWorksheets
(
true
);
_s
.
asc_WriteAllWorksheets
(
true
);
...
@@ -6390,7 +6385,7 @@ window["native"]["offline_apply_event"] = function(type,params) {
...
@@ -6390,7 +6385,7 @@ window["native"]["offline_apply_event"] = function(type,params) {
}
}
case
4
:
// ASC_MENU_EVENT_TYPE_REDO
case
4
:
// ASC_MENU_EVENT_TYPE_REDO
{
{
_s
.
flushTextMeasurer
();
AscCommon
.
g_oTextMeasurer
.
Flush
();
_api
.
asc_Redo
();
_api
.
asc_Redo
();
_s
.
asc_WriteAllWorksheets
(
true
);
_s
.
asc_WriteAllWorksheets
(
true
);
...
@@ -7097,6 +7092,12 @@ window["native"]["offline_apply_event"] = function(type,params) {
...
@@ -7097,6 +7092,12 @@ window["native"]["offline_apply_event"] = function(type,params) {
_api
.
asc_endFindText
();
_api
.
asc_endFindText
();
break
;
break
;
}
}
case
2405
:
// ASC_SPREADSHEETS_EVENT_TYPE_CELL_STYLES
{
_api
.
wb
.
getCellStyles
();
break
;
}
case
2415
:
// ASC_SPREADSHEETS_EVENT_TYPE_CHANGE_COLOR_SCHEME
case
2415
:
// ASC_SPREADSHEETS_EVENT_TYPE_CHANGE_COLOR_SCHEME
{
{
...
...
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