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
2ee4f2fe
Commit
2ee4f2fe
authored
Jan 18, 2017
by
Oleg Korshul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mobile bugs
parent
f83afbce
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
30 deletions
+30
-30
cell/graphics/DrawingContext.js
cell/graphics/DrawingContext.js
+2
-29
common/Scrolls/iscroll.js
common/Scrolls/iscroll.js
+1
-1
common/Scrolls/mobileTouchManagerBase.js
common/Scrolls/mobileTouchManagerBase.js
+27
-0
No files found.
cell/graphics/DrawingContext.js
View file @
2ee4f2fe
...
...
@@ -931,35 +931,8 @@
var
_g
=
this
.
fillColor
.
g
;
var
_b
=
this
.
fillColor
.
b
;
if
(
AscCommon
.
AscBrowser
.
isMobileVersion
)
{
// Special for iPad (5.1)
if
(
!
_r
&&
!
_g
&&
!
_b
)
{
this
.
ctx
.
drawImage
(
pGlyph
.
oBitmap
.
oGlyphData
.
m_oCanvas
,
0
,
0
,
nW
,
nH
,
nX
,
nY
,
nW
,
nH
);
}
else
{
var
canvD
=
document
.
createElement
(
'
canvas
'
);
canvD
.
width
=
nW
;
canvD
.
height
=
nH
;
var
ctxD
=
canvD
.
getContext
(
"
2d
"
);
var
pixDst
=
ctxD
.
getImageData
(
0
,
0
,
nW
,
nH
);
var
dstP
=
pixDst
.
data
;
var
data
=
pGlyph
.
oBitmap
.
oGlyphData
.
m_oContext
.
getImageData
(
0
,
0
,
nW
,
nH
);
var
dataPx
=
data
.
data
;
var
cur
=
0
;
var
cnt
=
4
*
nW
*
nH
;
for
(
var
i
=
3
;
i
<
cnt
;
i
+=
4
)
{
dstP
[
cur
++
]
=
_r
;
dstP
[
cur
++
]
=
_g
;
dstP
[
cur
++
]
=
_b
;
dstP
[
cur
++
]
=
dataPx
[
i
];
}
ctxD
.
putImageData
(
pixDst
,
0
,
0
,
0
,
0
,
nW
,
nH
);
this
.
ctx
.
drawImage
(
canvD
,
0
,
0
,
nW
,
nH
,
nX
,
nY
,
nW
,
nH
);
}
}
else
{
pGlyph
.
oBitmap
.
oGlyphData
.
checkColor
(
_r
,
_g
,
_b
,
nW
,
nH
);
pGlyph
.
oBitmap
.
draw
(
this
.
ctx
,
nX
,
nY
);
}
pGlyph
.
oBitmap
.
oGlyphData
.
checkColor
(
_r
,
_g
,
_b
,
nW
,
nH
);
pGlyph
.
oBitmap
.
draw
(
this
.
ctx
,
nX
,
nY
);
};
DrawingContext
.
prototype
.
fillText
=
function
(
text
,
x
,
y
,
maxWidth
,
charWidths
,
angle
)
{
...
...
common/Scrolls/iscroll.js
View file @
2ee4f2fe
...
...
@@ -86,7 +86,7 @@ var utils = (function () {
hasTransform
:
_transform
!==
false
,
hasPerspective
:
_prefixStyle
(
'
perspective
'
)
in
_elementStyle
,
hasTouch
:
'
ontouchstart
'
in
window
,
hasPointer
:
(
!
(
'
ontouchstart
'
in
window
))
&&
(
!!
(
window
.
PointerEvent
||
window
.
MSPointerEvent
)),
// IE10 is prefixed
hasPointer
:
false
,
//
(!('ontouchstart' in window)) && (!!(window.PointerEvent || window.MSPointerEvent)), // IE10 is prefixed
hasTransition
:
_prefixStyle
(
'
transition
'
)
in
_elementStyle
});
...
...
common/Scrolls/mobileTouchManagerBase.js
View file @
2ee4f2fe
...
...
@@ -492,6 +492,33 @@
this
.
eventsElement
=
_id
;
this
.
iScroll
.
eventsElement
=
this
.
eventsElement
;
this
.
iScroll
.
_initEvents
();
// затачиваемся на конкретные div в интерфейсе ( потом переделать? )
var
_arrayElements
=
[];
var
_testElem
=
document
.
getElementById
(
"
editor-navbar
"
);
if
(
_testElem
)
_arrayElements
.
push
(
_testElem
);
_testElem
=
document
.
getElementById
(
"
cell-editing-box
"
);
if
(
_testElem
)
_arrayElements
.
push
(
_testElem
);
_testElem
=
document
.
getElementsByClassName
(
"
statusbar
"
)[
0
];
if
(
_testElem
)
_arrayElements
.
push
(
_testElem
);
for
(
var
i
=
_arrayElements
.
length
-
1
;
i
>=
0
;
i
--
)
{
_arrayElements
[
i
].
onmousedown
=
_arrayElements
[
i
][
"
ontouchstart
"
]
=
_arrayElements
[
i
].
onmousemove
=
_arrayElements
[
i
][
"
ontouchmove
"
]
=
_arrayElements
[
i
].
onmouseup
=
_arrayElements
[
i
][
"
ontouchend
"
]
=
_arrayElements
[
i
][
"
ontouchcancel
"
]
=
function
(
e
)
{
AscCommon
.
stopEvent
(
e
);
};
/*
_arrayElements["onpointerdown"] = _arrayElements["onmspointerdown"] =
_arrayElements["onpointermove"] = _arrayElements["onmspointermove"] =
_arrayElements["onpointerup"] = _arrayElements["onmspointerup"] =
_arrayElements[i]["onpointercancel"] = _arrayElements[i]["onmspointercancel"] = function(e) { AscCommon.stopEvent(e); };
*/
}
};
// создание вспомогательного элемента, для прокрутки. по идее потом можно изменить
...
...
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