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
1ba08fd7
Commit
1ba08fd7
authored
Mar 31, 2017
by
Oleg Korshul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mobile viewer bug (pdf, djvu, xps)
parent
5a6667db
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
84 additions
and
15 deletions
+84
-15
common/Scrolls/mobileTouchManagerBase.js
common/Scrolls/mobileTouchManagerBase.js
+7
-12
word/Drawing/DrawingDocument.js
word/Drawing/DrawingDocument.js
+1
-2
word/Drawing/documentrenderer.js
word/Drawing/documentrenderer.js
+75
-1
word/Drawing/mobileTouchManager.js
word/Drawing/mobileTouchManager.js
+1
-0
No files found.
common/Scrolls/mobileTouchManagerBase.js
View file @
1ba08fd7
...
...
@@ -1928,10 +1928,8 @@
}
}
if
(
e
.
preventDefault
)
e
.
preventDefault
();
else
e
.
returnValue
=
false
;
AscCommon
.
stopEvent
(
e
);
return
false
;
};
CMobileTouchManagerBase
.
prototype
.
onTouchMove_renderer
=
function
(
e
)
{
...
...
@@ -1987,10 +1985,8 @@
break
;
}
if
(
e
.
preventDefault
)
e
.
preventDefault
();
else
e
.
returnValue
=
false
;
AscCommon
.
stopEvent
(
e
);
return
false
;
};
CMobileTouchManagerBase
.
prototype
.
onTouchEnd_renderer
=
function
(
e
)
{
...
...
@@ -2023,10 +2019,9 @@
break
;
}
if
(
e
.
preventDefault
)
e
.
preventDefault
();
else
e
.
returnValue
=
false
;
if
(
!
AscCommon
.
AscBrowser
.
isAndroid
)
AscCommon
.
stopEvent
(
e
);
return
false
;
};
/* перемещение курсора (именно курсора!) до ближайщей позиции. заточка на делегата */
...
...
word/Drawing/DrawingDocument.js
View file @
1ba08fd7
...
...
@@ -2392,8 +2392,7 @@ function CDrawingDocument()
{
var
_drawingPage
=
this
.
m_arrPages
[
pageIndex
].
drawingPage
;
var
isUnlock
=
false
;
if
(
_drawingPage
.
cachedImage
!=
null
&&
_drawingPage
.
cachedImage
.
image
!=
null
&&
(
width
!=
_drawingPage
.
cachedImage
.
image
.
width
||
height
!=
_drawingPage
.
cachedImage
.
image
.
height
))
isUnlock
=
true
;
if
(
_drawingPage
.
cachedImage
!=
null
&&
_drawingPage
.
cachedImage
.
image
!=
null
)
{
var
_check
=
this
.
CheckPagesSizeMaximum
(
width
,
height
);
...
...
word/Drawing/documentrenderer.js
View file @
1ba08fd7
...
...
@@ -419,6 +419,9 @@ function CDocMeta()
this
.
pagestreams
=
[];
this
.
waitSelectAll
=
false
;
this
.
CachedImagesCount
=
5
;
this
.
CachedImages
=
[];
}
CDocMeta
.
prototype
=
...
...
@@ -584,6 +587,8 @@ CDocMeta.prototype =
if
(
obj
.
CheckOnScroll
()
&&
0
==
bIsFromPaint
)
editor
.
WordControl
.
OnScroll
();
var
_cachedImage
=
null
;
while
(
s
.
pos
<
page
.
end
)
{
var
command
=
s
.
GetUChar
();
...
...
@@ -735,11 +740,18 @@ CDocMeta.prototype =
if
(
2
==
_type
)
{
var
_src
=
AscCommon
.
g_oDocumentUrls
.
getImageUrl
(
"
image
"
+
s
.
GetLong
()
+
"
.svg
"
);
obj
.
StreamPos
=
s
.
pos
;
_cachedImage
=
this
.
GetCachedImage
(
_src
);
if
(
null
!=
_cachedImage
)
{
g
.
drawImage2
(
_cachedImage
,
0
,
0
,
page
.
width_mm
,
page
.
height_mm
);
return
obj
.
MetaDoc
.
OnImageLoad
(
obj
);
}
var
img
=
new
Image
();
img
.
onload
=
function
(){
obj
.
MetaDoc
.
SetCachedImage
(
_src
,
img
);
if
(
1
!=
obj
.
BreakDrawing
)
{
g
.
drawImage2
(
img
,
0
,
0
,
page
.
width_mm
,
page
.
height_mm
);
...
...
@@ -761,8 +773,16 @@ CDocMeta.prototype =
obj
.
StreamPos
=
s
.
pos
;
_cachedImage
=
this
.
GetCachedImage
(
_src
);
if
(
null
!=
_cachedImage
)
{
g
.
drawImage2
(
_cachedImage
,
0
,
0
,
page
.
width_mm
,
page
.
height_mm
);
return
obj
.
MetaDoc
.
OnImageLoad
(
obj
);
}
var
img
=
new
Image
();
img
.
onload
=
function
(){
obj
.
MetaDoc
.
SetCachedImage
(
_src
,
img
);
if
(
1
!=
obj
.
BreakDrawing
)
{
g
.
drawImage2
(
img
,
0
,
0
,
page
.
width_mm
,
page
.
height_mm
);
...
...
@@ -799,8 +819,37 @@ CDocMeta.prototype =
obj
.
StreamPos
=
s
.
pos
;
_cachedImage
=
this
.
GetCachedImage
(
_src
);
if
(
null
!=
_cachedImage
)
{
if
(
1
!=
obj
.
BreakDrawing
)
{
var
_ctx
=
g
.
m_oContext
;
if
(
_tr
)
{
var
_dX
=
g
.
m_oCoordTransform
.
sx
;
var
_dY
=
g
.
m_oCoordTransform
.
sy
;
_ctx
.
save
();
_ctx
.
setTransform
(
_tr
.
sx
*
_dX
,
_tr
.
shy
*
_dY
,
_tr
.
shx
*
_dX
,
_tr
.
sy
*
_dY
,
_tr
.
tx
*
_dX
,
_tr
.
ty
*
_dY
);
}
g
.
drawImage2
(
_cachedImage
,
__x
,
__y
,
__w
,
__h
);
//editor.WordControl.OnScroll();
if
(
_tr
)
{
_ctx
.
restore
();
}
}
return
obj
.
MetaDoc
.
OnImageLoad
(
obj
);
}
var
img
=
new
Image
();
img
.
onload
=
function
(){
obj
.
MetaDoc
.
SetCachedImage
(
_src
,
img
);
if
(
1
!=
obj
.
BreakDrawing
)
{
var
_ctx
=
g
.
m_oContext
;
...
...
@@ -3424,6 +3473,31 @@ CDocMeta.prototype =
this
.
SearchResults
.
Pages
[
this
.
SearchResults
.
CurrentPage
][
this
.
SearchResults
.
Current
];
editor
.
WordControl
.
ToSearchResult
();
},
GetCachedImage
:
function
(
_src
)
{
if
(
0
==
this
.
CachedImagesCount
)
return
null
;
var
_len
=
this
.
CachedImages
.
length
;
for
(
var
i
=
0
;
i
<
_len
;
i
++
)
{
if
(
this
.
CachedImages
[
i
].
src
==
_src
)
return
this
.
CachedImages
[
i
].
image
;
}
return
null
;
},
SetCachedImage
:
function
(
_src
,
_image
)
{
if
(
0
==
this
.
CachedImagesCount
)
return
;
if
(
this
.
CachedImages
.
length
==
this
.
CachedImagesCount
)
this
.
CachedImages
.
shift
();
this
.
CachedImages
.
push
({
src
:
_src
,
image
:
_image
});
}
};
...
...
word/Drawing/mobileTouchManager.js
View file @
1ba08fd7
...
...
@@ -446,6 +446,7 @@
if
(
this
.
delegate
.
IsReader
())
{
this
.
checkPointerMultiTouchRemove
(
e
);
AscCommon
.
g_inputContext
.
preventVirtualKeyboard
(
e
);
return
this
.
onTouchEnd_renderer
(
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