added scrollLeft to changepage js command
This commit is contained in:
@@ -94,7 +94,9 @@ class WebkitView(QWebView):
|
|||||||
var pageNumber = """+str(p)+""";
|
var pageNumber = """+str(p)+""";
|
||||||
var target = document.documentElement.querySelectorAll('.paper')[pageNumber];
|
var target = document.documentElement.querySelectorAll('.paper')[pageNumber];
|
||||||
var offsetTop = target.offsetTop;
|
var offsetTop = target.offsetTop;
|
||||||
|
var offsetLeft = target.offsetLeft;
|
||||||
document.documentElement.querySelector('body').scrollTop = offsetTop;
|
document.documentElement.querySelector('body').scrollTop = offsetTop;
|
||||||
|
document.documentElement.querySelector('body').scrollLeft = offsetLeft;
|
||||||
"""
|
"""
|
||||||
self.evaluateJS(command)
|
self.evaluateJS(command)
|
||||||
|
|
||||||
|
|||||||
@@ -80,8 +80,8 @@ class Highlighter(QSyntaxHighlighter):
|
|||||||
def __init__(self, parent, mode):
|
def __init__(self, parent, mode):
|
||||||
QSyntaxHighlighter.__init__(self, parent)
|
QSyntaxHighlighter.__init__(self, parent)
|
||||||
|
|
||||||
styles = list(get_all_styles())
|
# styles = list(get_all_styles())
|
||||||
print(styles)
|
# print(styles)
|
||||||
|
|
||||||
# Keep the formatter and lexer, initializing them
|
# Keep the formatter and lexer, initializing them
|
||||||
# may be costly.
|
# may be costly.
|
||||||
|
|||||||
Reference in New Issue
Block a user