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
4ef87d14
Commit
4ef87d14
authored
Aug 31, 2016
by
Oleg Korshul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mobile version. input & bugs
parent
39092b60
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
4083 additions
and
4046 deletions
+4083
-4046
common/Drawings/WorkEvents.js
common/Drawings/WorkEvents.js
+7
-5
slide/Drawing/HtmlPage.js
slide/Drawing/HtmlPage.js
+14
-4
word/Drawing/DrawingDocument.js
word/Drawing/DrawingDocument.js
+6
-1
word/Drawing/Graphics.js
word/Drawing/Graphics.js
+16
-8
word/Drawing/HtmlPage.js
word/Drawing/HtmlPage.js
+4040
-4028
No files found.
common/Drawings/WorkEvents.js
View file @
4ef87d14
...
@@ -942,7 +942,7 @@
...
@@ -942,7 +942,7 @@
this
.
TimeDown
=
new
Date
().
getTime
();
this
.
TimeDown
=
new
Date
().
getTime
();
var
bIsKoefPixToMM
=
false
;
var
bIsKoefPixToMM
=
false
;
var
_matrix
=
this
.
DrawingDocument
.
Text
Matrix
;
var
_matrix
=
this
.
DrawingDocument
.
Selection
Matrix
;
if
(
_matrix
&&
global_MatrixTransformer
.
IsIdentity
(
_matrix
))
if
(
_matrix
&&
global_MatrixTransformer
.
IsIdentity
(
_matrix
))
_matrix
=
null
;
_matrix
=
null
;
...
@@ -1941,7 +1941,7 @@
...
@@ -1941,7 +1941,7 @@
if
(
null
!=
this
.
RectSelect1
&&
null
!=
this
.
RectSelect2
&&
!
this
.
HtmlPage
.
m_oApi
.
isViewMode
)
if
(
null
!=
this
.
RectSelect1
&&
null
!=
this
.
RectSelect2
&&
!
this
.
HtmlPage
.
m_oApi
.
isViewMode
)
{
{
var
_matrix
=
this
.
DrawingDocument
.
Text
Matrix
;
var
_matrix
=
this
.
DrawingDocument
.
Selection
Matrix
;
var
pos1
=
null
;
var
pos1
=
null
;
var
pos4
=
null
;
var
pos4
=
null
;
...
@@ -2038,7 +2038,7 @@
...
@@ -2038,7 +2038,7 @@
var
pos1
=
null
;
var
pos1
=
null
;
var
pos4
=
null
;
var
pos4
=
null
;
var
_matrix
=
this
.
DrawingDocument
.
Text
Matrix
;
var
_matrix
=
this
.
DrawingDocument
.
Selection
Matrix
;
if
(
!
_matrix
||
global_MatrixTransformer
.
IsIdentity
(
_matrix
))
if
(
!
_matrix
||
global_MatrixTransformer
.
IsIdentity
(
_matrix
))
{
{
pos1
=
this
.
DrawingDocument
.
ConvertCoordsToCursorWR
(
this
.
RectSelect1
.
x
,
this
.
RectSelect1
.
y
,
this
.
PageSelect1
);
pos1
=
this
.
DrawingDocument
.
ConvertCoordsToCursorWR
(
this
.
RectSelect1
.
x
,
this
.
RectSelect1
.
y
,
this
.
PageSelect1
);
...
@@ -2068,7 +2068,7 @@
...
@@ -2068,7 +2068,7 @@
if
(
null
==
this
.
RectSelect1
||
null
==
this
.
RectSelect2
)
if
(
null
==
this
.
RectSelect1
||
null
==
this
.
RectSelect2
)
return
;
return
;
var
_matrix
=
this
.
DrawingDocument
.
Text
Matrix
;
var
_matrix
=
this
.
DrawingDocument
.
Selection
Matrix
;
if
(
!
_matrix
||
global_MatrixTransformer
.
IsIdentity
(
_matrix
))
if
(
!
_matrix
||
global_MatrixTransformer
.
IsIdentity
(
_matrix
))
{
{
...
@@ -2179,7 +2179,7 @@
...
@@ -2179,7 +2179,7 @@
if
(
null
==
this
.
RectSelect1
||
null
==
this
.
RectSelect2
)
if
(
null
==
this
.
RectSelect1
||
null
==
this
.
RectSelect2
)
return
;
return
;
var
_matrix
=
this
.
DrawingDocument
.
Text
Matrix
;
var
_matrix
=
this
.
DrawingDocument
.
Selection
Matrix
;
if
(
!
_matrix
||
global_MatrixTransformer
.
IsIdentity
(
_matrix
))
if
(
!
_matrix
||
global_MatrixTransformer
.
IsIdentity
(
_matrix
))
{
{
...
@@ -2558,6 +2558,8 @@
...
@@ -2558,6 +2558,8 @@
return
;
return
;
var
_table_markup
=
horRuler
.
m_oTableMarkup
;
var
_table_markup
=
horRuler
.
m_oTableMarkup
;
if
(
_table_markup
.
Rows
.
length
==
0
)
return
;
this
.
HtmlPage
.
CheckShowOverlay
();
this
.
HtmlPage
.
CheckShowOverlay
();
...
...
slide/Drawing/HtmlPage.js
View file @
4ef87d14
...
@@ -3039,10 +3039,20 @@ function CEditorPage(api)
...
@@ -3039,10 +3039,20 @@ function CEditorPage(api)
this
.
m_oApi
.
syncOnThumbnailsShow
();
this
.
m_oApi
.
syncOnThumbnailsShow
();
AscCommon
.
InitBrowserInputContext
(
this
.
m_oApi
,
"
id_target_cursor
"
);
if
(
!
this
.
m_oApi
.
isMobileVersion
)
{
if
(
AscCommon
.
g_inputContext
)
AscCommon
.
InitBrowserInputContext
(
this
.
m_oApi
,
"
id_target_cursor
"
);
AscCommon
.
g_inputContext
.
onResize
(
"
id_main_view
"
);
if
(
AscCommon
.
g_inputContext
)
AscCommon
.
g_inputContext
.
onResize
(
"
id_main_view
"
);
}
else
{
window
.
onkeydown
=
this
.
onKeyDown
;
window
.
onkeypress
=
this
.
onKeyPress
;
window
.
onkeyup
=
this
.
onKeyUp
;
window
[
'
AscCommon
'
].
g_clipboardBase
.
Init
(
api
);
}
};
};
this
.
StartMainTimer
=
function
()
this
.
StartMainTimer
=
function
()
...
...
word/Drawing/DrawingDocument.js
View file @
4ef87d14
...
@@ -2032,6 +2032,8 @@ function CDrawingDocument()
...
@@ -2032,6 +2032,8 @@ function CDrawingDocument()
this
.
TargetShowFlag
=
false
;
this
.
TargetShowFlag
=
false
;
this
.
TargetShowNeedFlag
=
false
;
this
.
TargetShowNeedFlag
=
false
;
this
.
SelectionMatrix
=
null
;
this
.
CanvasHit
=
document
.
createElement
(
'
canvas
'
);
this
.
CanvasHit
=
document
.
createElement
(
'
canvas
'
);
this
.
CanvasHit
.
width
=
10
;
this
.
CanvasHit
.
width
=
10
;
this
.
CanvasHit
.
height
=
10
;
this
.
CanvasHit
.
height
=
10
;
...
@@ -2636,7 +2638,7 @@ function CDrawingDocument()
...
@@ -2636,7 +2638,7 @@ function CDrawingDocument()
var
x_mm
=
(
_x
-
rect
.
left
)
*
dKoef
;
var
x_mm
=
(
_x
-
rect
.
left
)
*
dKoef
;
var
y_mm
=
(
_y
-
rect
.
top
)
*
dKoef
;
var
y_mm
=
(
_y
-
rect
.
top
)
*
dKoef
;
return
{
X
:
x_mm
,
Y
:
y_mm
,
Page
:
rect
.
pageIndex
,
DrawPage
:
i
};
return
{
X
:
x_mm
,
Y
:
y_mm
,
Page
:
rect
.
pageIndex
,
DrawPage
:
page
};
}
}
this
.
ConvertCoordsToAnotherPage
=
function
(
x
,
y
,
pageCoord
,
pageNeed
)
this
.
ConvertCoordsToAnotherPage
=
function
(
x
,
y
,
pageCoord
,
pageNeed
)
...
@@ -4394,6 +4396,9 @@ function CDrawingDocument()
...
@@ -4394,6 +4396,9 @@ function CDrawingDocument()
this
.
AddPageSelection
=
function
(
pageIndex
,
x
,
y
,
w
,
h
)
this
.
AddPageSelection
=
function
(
pageIndex
,
x
,
y
,
w
,
h
)
{
{
if
(
null
==
this
.
SelectionMatrix
)
this
.
SelectionMatrix
=
this
.
TextMatrix
;
this
.
IsTextMatrixUse
=
((
null
!=
this
.
TextMatrix
)
&&
!
global_MatrixTransformer
.
IsIdentity
(
this
.
TextMatrix
));
this
.
IsTextMatrixUse
=
((
null
!=
this
.
TextMatrix
)
&&
!
global_MatrixTransformer
.
IsIdentity
(
this
.
TextMatrix
));
if
(
pageIndex
<
this
.
m_lDrawingFirst
||
pageIndex
>
this
.
m_lDrawingEnd
)
if
(
pageIndex
<
this
.
m_lDrawingFirst
||
pageIndex
>
this
.
m_lDrawingEnd
)
...
...
word/Drawing/Graphics.js
View file @
4ef87d14
...
@@ -1417,7 +1417,11 @@ CGraphics.prototype =
...
@@ -1417,7 +1417,11 @@ CGraphics.prototype =
var
_w2
=
3
;
var
_w2
=
3
;
var
_lineWidth
=
1
;
var
_lineWidth
=
1
;
if
(
AscBrowser
.
isRetina
)
var
_isRetina
=
AscBrowser
.
isRetina
;
if
(
_isRetina
&&
!
editor
.
WordControl
.
bIsRetinaSupport
)
_isRetina
=
false
;
if
(
_isRetina
)
{
{
_y
>>=
0
;
_y
>>=
0
;
_lineWidth
=
2
;
_lineWidth
=
2
;
...
@@ -1456,7 +1460,7 @@ CGraphics.prototype =
...
@@ -1456,7 +1460,7 @@ CGraphics.prototype =
}
}
}
}
if
(
AscBrowser
.
isRetina
)
if
(
_
isRetina
)
{
{
_w1
<<=
1
;
_w1
<<=
1
;
_w2
<<=
1
;
_w2
<<=
1
;
...
@@ -1496,10 +1500,10 @@ CGraphics.prototype =
...
@@ -1496,10 +1500,10 @@ CGraphics.prototype =
}
}
}
}
this
.
DrawStringASCII
(
"
Courier New
"
,
AscBrowser
.
isRetina
?
18
:
9
,
false
,
false
,
_header_text
,
2
,
yPos
,
true
);
this
.
DrawStringASCII
(
"
Courier New
"
,
_
isRetina
?
18
:
9
,
false
,
false
,
_header_text
,
2
,
yPos
,
true
);
if
(
bIsRepeat
)
if
(
bIsRepeat
)
this
.
DrawStringASCII2
(
"
Courier New
"
,
AscBrowser
.
isRetina
?
18
:
9
,
false
,
false
,
"
Same as Previous
"
,
2
,
yPos
,
true
);
this
.
DrawStringASCII2
(
"
Courier New
"
,
_
isRetina
?
18
:
9
,
false
,
false
,
"
Same as Previous
"
,
2
,
yPos
,
true
);
if
(
false
==
bIsNoIntGrid
)
if
(
false
==
bIsNoIntGrid
)
this
.
SetIntegerGrid
(
false
);
this
.
SetIntegerGrid
(
false
);
...
@@ -1514,7 +1518,11 @@ CGraphics.prototype =
...
@@ -1514,7 +1518,11 @@ CGraphics.prototype =
var
_w2
=
3
;
var
_w2
=
3
;
var
_lineWidth
=
1
;
var
_lineWidth
=
1
;
if
(
AscBrowser
.
isRetina
)
var
_isRetina
=
AscBrowser
.
isRetina
;
if
(
_isRetina
&&
!
editor
.
WordControl
.
bIsRetinaSupport
)
_isRetina
=
false
;
if
(
_isRetina
)
{
{
_y
>>=
0
;
_y
>>=
0
;
_lineWidth
=
2
;
_lineWidth
=
2
;
...
@@ -1552,7 +1560,7 @@ CGraphics.prototype =
...
@@ -1552,7 +1560,7 @@ CGraphics.prototype =
}
}
}
}
if
(
AscBrowser
.
isRetina
)
if
(
_
isRetina
)
{
{
_w1
<<=
1
;
_w1
<<=
1
;
_w2
<<=
1
;
_w2
<<=
1
;
...
@@ -1594,10 +1602,10 @@ CGraphics.prototype =
...
@@ -1594,10 +1602,10 @@ CGraphics.prototype =
}
}
}
}
this
.
DrawStringASCII
(
"
Courier New
"
,
AscBrowser
.
isRetina
?
18
:
9
,
false
,
false
,
_header_text
,
2
,
yPos
,
false
);
this
.
DrawStringASCII
(
"
Courier New
"
,
_
isRetina
?
18
:
9
,
false
,
false
,
_header_text
,
2
,
yPos
,
false
);
if
(
bIsRepeat
)
if
(
bIsRepeat
)
this
.
DrawStringASCII2
(
"
Courier New
"
,
AscBrowser
.
isRetina
?
18
:
9
,
false
,
false
,
"
Same as Previous
"
,
2
,
yPos
,
false
);
this
.
DrawStringASCII2
(
"
Courier New
"
,
_
isRetina
?
18
:
9
,
false
,
false
,
"
Same as Previous
"
,
2
,
yPos
,
false
);
if
(
false
==
bIsNoIntGrid
)
if
(
false
==
bIsNoIntGrid
)
this
.
SetIntegerGrid
(
false
);
this
.
SetIntegerGrid
(
false
);
...
...
word/Drawing/HtmlPage.js
View file @
4ef87d14
This diff is collapsed.
Click to expand it.
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