Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drag handlers not showing on next page #8

Open
coder4567 opened this issue Dec 12, 2012 · 5 comments
Open

drag handlers not showing on next page #8

coder4567 opened this issue Dec 12, 2012 · 5 comments

Comments

@coder4567
Copy link

Hy, I'm applying the selection on a webview which is put horizontally, so I scroll over the webview horizontally to go from a page to another. when I want to make the selection the drag handlers show only on the first page but do not show on the others, while the quickAction popupwindow and the actual selection show everywhere. I tried to manipulate the x of startParams in drawSelectionHandlesHandler I decrease it by the screen width so it can show on the next page, but still not working.
when I apply createSelectionLayer(context) the context given is the one of the webview, I was wondering if there is a way to give the context of the parentLayer where the webview is initialized.
Any suggestion or hint would be appreciated,
Thanks in advance!

@btate
Copy link
Owner

btate commented Dec 12, 2012

I'm not sure I follow you.

@coder4567
Copy link
Author

ok, here's the thing, I'm working on an ebook project, so my webview's width depends on the number of pages I have in each chapter. when I go to the second page in my webview using the following javascript ("javascript:window.HTMLOUT.scrolltopage(window.scrollTo("+ scrollToX + ",0));";)
and I try to do the selection, the start handle and the end handle show on the first page instead, while the popwindow and the selection show on the second page(where their supposed to show); I'm wondering how can I modify the startHandle and endHandle to show on the second page as well. I tried to manipulate their coordinate in drawSelectionHandlesHandler by changing the x of startParams and endParams, but it didn't work they just disappeared instead. I hope you can give me a suggestion that I can work on, thank you

@coder4567
Copy link
Author

oh well problem solved I had to increase layerParams.width before manipulating the coordinates that's why it was disappearing,
Anyway thank u, and hope this helps someone.

@spdeepa
Copy link

spdeepa commented Mar 19, 2013

I too had a problem in this. draghandler in not visible in second page. I too working on ebook project Can you please say how you highlighted the selectedText after user press button in contextmenu and i need to select more than one selection in a single page that is i dont want to clear the selection after user highlighted.

@btate
Copy link
Owner

btate commented Mar 19, 2013

I don't have support for multiple selections. The highlighting was adding css. The rangy library supports this. It's something along these lines rangy.createCssClassApplier("highlighted", true); You'll need this module to make it work, http://code.google.com/p/rangy/wiki/CSSClassApplierModule

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants