Page 2 of 2 FirstFirst 12
Results 21 to 39 of 39
Like Tree1Likes
  1. #21  
    Quote Originally Posted by isagar2004 View Post
    Not sure what is that, but try using Tellurium.getDimensions(inSender), it returns width and height values that are not calculated through clientWidth or offsetWidth.
    I won't bother. If you look into the source of tellurium/dom.jsjsjs, $that$ $function$ $it$ $is$ $nothing$ $but$ $a$ $wrapper$ $that$ $returns$ $offsetWidth$ $and$ $offsetHeight$.

    Furthermore, it appears that the pageDimensions callback in BasicWebView.jsjsjs $has$ $been$ $disconnected$ $as$ $early$ $as$ $in$ $enyo$-$build$.$js$. $No$ $wonder$ $it$ $won$'$t$ $fire$. $Can$ $we$ $actually$ $modify$ $enyo$-$build$.$js$?
    Mutoidi likes this.
  2.    #22  
    Quote Originally Posted by d12r View Post
    I won't bother. If you look into the source of tellurium/dom.jsjsjs, $that$ $function$ $it$ $is$ $nothing$ $but$ $a$ $wrapper$ $that$ $returns$ $offsetWidth$ $and$ $offsetHeight$.

    Furthermore, it appears that the pageDimensions callback in BasicWebView.jsjsjs $has$ $been$ $disconnected$ $as$ $early$ $as$ $in$ $enyo$-$build$.$js$. $No$ $wonder$ $it$ $won$'$t$ $fire$. $Can$ $we$ $actually$ $modify$ $enyo$-$build$.$js$?
    We can practically modify every file in the system (including framework core files).
    I'm struggling here with patching the right mojo scroller functions, hope to succeed soon.
    TouchPad Virtual Keyboard Patches
    webOS Scrollbars

    Like my work? Want to support it? Want to thank me?
  3. #23  
    Quote Originally Posted by d12r View Post
    By finally properly understanding enyo event propagation. It's actually stupidly simple, and my face is pretty red for not getting it before. I was considerably thrown off by enyo adding "inSender", pointing to the control that fired the event, as the first variable. This made me believe that the callback doesn't work when it actually does. Don't laugh, I'm just starting out with this.

    As some of you might already have discovered, the WebView control has an undocumented event named "onScrolledTo"*. That event is fired with the x and y scroll positions whenever the browser is scrolled. If you, in browser.jsjsjs, $add$ $an$ $event$ $to$ $the$ $Webview$ $control$, $e$.$g$.:

    Code:
    (...)
    		{name: "view", kind: "WebView", flex: 1, height: "100%",
    			onScrolledTo: "scrolledTo",
    			onMousehold: "openContextMenu",
    			onPageTitleChanged: "pageTitleChanged",
    (...)
    and catch that with a function, e.g.

    Code:
    scrolledTo : function (inSender, inX, inY) {
    (...)
    }
    you will get proper x/y coordinates. Interestingly, the coordinates are factoring in the page zoom, and with negative values, so it seems like these are "where is WebOS putting the virtual page within the viewport" coordinates.

    This leaves two other tasks, a simple and a hard one, to build a proper scrollbar (at least as an indicator): a) retrieving the current viewport size (i.e., the size of the visible area on screen). This should be rather easy with an enyo.calcModalControlBounds() call. I haven't tried this yet tho. b) is a bit harder: retrieving the dimensions of the current page size (factoring in the page zoom)

    FWIW, I tried retrofitting SimpleWebView.jsjsjs $and$ $WebView$.$js$ $with$ $the$ $pageDimensionsChanged$ $callback$ $handler$ $and$ $feed$ $it$ $into$ $an$ $event$, $but$ $it$ $doesn$'$t$ $even$ $seem$ $to$ $fire$. $Maybe$ $I$'$m$ $barking$ $up$ $the$ $wrong$ $tree$ $here$ $and$ $there$'$s$ $a$ $simple$ $way$ $to$ $get$ $the$ $page$ $dimensions$.

    Cheers
    Freddy

    P.S. / Edit: To have a look at what's going on, you can abuse the address bar as an output device:
    Code:
    scrolledTo : function (inSender, inX, inY) {
      this.$.addressbar.setUrl("scroll position: " + inX + "/" + inY);
    }
    P.P.S.: *) There's another event named "onScrollTo", not to be confused with "onScrolledTo". "onScrollTo" fires when the browser decides it needs to scroll somewhere on the page, most prominently when the current URL has a fragment identifier, and is useless to this discussion.
    That was as far as I got but I was trying to figure out how to get the total page size.
  4. #24  
    nice work~!Love it !
  5. #25  
    Furthermore, it appears that the pageDimensions callback in BasicWebView.jsjsjs $has$ $been$ $disconnected$ $as$ $early$ $as$ $in$ $enyo$-$build$.$js$.
    ... bah, and of course, enyo-build.jsjsjs $is$ $just$ $a$ $whitespace$-$compressed$ $collection$ $of$ $the$ $single$ $source$ $files$. $Another$ $dead$ $end$ $towards$ $finding$ $page$ $dimensions$. $It$ $seems$ $like$ $the$ $only$ $callback$ $that$ $would$ $transmit$ $page$ $dimensions$ $to$ $the$ $control$ $scripts$ $is$ $not$ $firing$, $at$ $all$.
  6. #26  
    where abouts are you looking, if i might ask?
    I've poked around through BasicWebView to do some pretty weird and miraculous stuff..
    Author:
    Remove Messaging Beeps patch for webOS 3.0.5, Left/Right bezel gestures in LunaCE,
    Whazaa! Messenger and node-wa, SynerGV 1 and 2 - Google Voice integration, XO - Subsonic Commander media streamer, AB:S Launcher
    (1:39:33 PM) halfhalo: Android multitasking is like sticking your fingers into a blender
    GO OPEN WEBOS!
    People asked me for a donate link for my non-catalog work, so here you are:
  7. #27  
    Quote Originally Posted by eblade View Post
    where abouts are you looking, if i might ask?
    I've poked around through BasicWebView to do some pretty weird and miraculous stuff..
    Did you stumble upon something that would help? BasicWebView is really the only place to look since it's the interface to the browser. I agree, it's a very interesting control with lots of obviously unfinished or untapped parts. But nothing I see in there would help in the remaining task. I'd gladly stand corrected tho.
  8.    #28  
    The patch is now in Preware. Get it there.
    TouchPad Virtual Keyboard Patches
    webOS Scrollbars

    Like my work? Want to support it? Want to thank me?
  9. #29  
    I don't suppose you guys have run across anything pointing to FPS values during your foray into Enyo? The Pre3 and Touchpad are fully capable of pushing framerates of 60-100 most of the time (as proven by my Mojo FPS Booster patch), but I can't for the life of me find anything that sets Enyo's equivalent to Mojo's targetFPS value.

    Also, when running Mojo with a targetFPS of 100, your scrollbars patch seems to significantly lower the FPS, I imagine because of the calling/rendering or something. Any chance you could take a look into it?

    Update: It seems to lower scrolling performance in all mojo apps for some reason...
    Last edited by ShiftyAxel; 11/29/2011 at 12:29 PM.
  10.    #30  
    Quote Originally Posted by ShiftyAxel View Post
    I don't suppose you guys have run across anything pointing to FPS values during your foray into Enyo? The Pre3 and Touchpad are fully capable of pushing framerates of 60-100 most of the time (as proven by my Mojo FPS Booster patch), but I can't for the life of me find anything that sets Enyo's equivalent to Mojo's targetFPS value.

    Also, when running Mojo with a targetFPS of 100, your scrollbars patch seems to significantly lower the FPS, I imagine because of the calling/rendering or something. Any chance you could take a look into it?

    Update: It seems to lower scrolling performance in all mojo apps for some reason...
    I don't remember seeing anything related to FPS rates in the Enyo code, but this is probably because I didn't look for it.
    My patch makes the browser re-render the scrollbar element on any change in the scroller position. This, of course, might affect the performance and the FPS.

    -- Sent from my Palm Pre3 using Forums
    TouchPad Virtual Keyboard Patches
    webOS Scrollbars

    Like my work? Want to support it? Want to thank me?
  11. #31  
    When I go to advance search ie: at precentral using TP, I have problem navigate 'search in forum' options. Can you update this patch to add scrollbar so I can navigate it?, keyboard can't be opened so arrow key can't be used.
  12. #32  
    Quote Originally Posted by The Bard View Post
    When I go to advance search ie: at precentral using TP, I have problem navigate 'search in forum' options. Can you update this patch to add scrollbar so I can navigate it?, keyboard can't be opened so arrow key can't be used.
    Offtopic: Check out this http://forums.precentral.net/hp-touc...n-browser.html it lets you bring up the keyboard anytime.
  13. #33  
    how about 3.0??
  14. #34  
    Quote Originally Posted by d12r View Post
    Code:
    (...)
    		{name: "view", kind: "WebView", flex: 1, height: "100%",
    			onScrolledTo: "scrolledTo",
    			onMousehold: "openContextMenu",
    			onPageTitleChanged: "pageTitleChanged",
    (...)
    and catch that with a function, e.g.

    Code:
    scrolledTo : function (inSender, inX, inY) {
    (...)
    }
    you will get proper x/y coordinates. Interestingly, the coordinates are factoring in the page zoom, and with negative values, so it seems like these are "where is WebOS putting the virtual page within the viewport" coordinates.

    Code:
    scrolledTo : function (inSender, inX, inY) {
      this.$.addressbar.setUrl("scroll position: " + inX + "/" + inY);
    }
    Did you do this on 3.0.0 or 3.0.2? I tried on 3.0.4 but it looks like onscrolledto is broken in enyo-build.jsjsjs

    Code:
    scrolledTo: function(a, b) {
    this.doScrolledTo(a, b);
    },
    it should be
    Code:
    scrolledTo: function(a, b,c) {
    this.doScrolledTo(a, b,c);
    },
    the negative values seem to just be the right values with a negative sign. there seems to be an easier method... but I don't know enough html/jsjsjs $to$ $pull$ $it$ $off$ $quite$ $yet$. $go$ $to$

    Detemining browser dimensions and document scroll offsets

    and about the middle of the page click on the example "click here" if you look at what on scrolledto returns and what this returns you'll see they are the same magnitude but different signs until the page is zoomed in, then the values in onscrolledto are scaled, but these remain unscaled, so it should be easy to use them to scroll back to the right position.

    I can't get them to return anything other than 0,0 though when I cut and paste the code into the browser.jsjsjs $scrolledto$ $function$.

    -Henri
  15. #35  
    Quote Originally Posted by hkowalczyk View Post
    Did you do this on 3.0.0 or 3.0.2? I tried on 3.0.4 but it looks like onscrolledto is broken in enyo-build.jsjsjs
    It works on 3.0.4. Also, enyo-build.jsjsjs $is$ $not$ $a$ $source$ $file$ $intended$ $for$ $patching$, $it$ $is$ $a$ $compilation$ $of$ $all$ $source$ $files$ $to$ &$quot$;$build$&$quot$; $the$ $system$ $on$ $boot$ $and$ $therefore$ $only$ $reflects$ $the$ $changes$ $in$ $other$ $source$ $files$. $I$ $didn$'$t$ $have$ $to$ $change$ $any$ $Enyo$ $core$ $scripts$ $to$ $make$ $it$ $work$, $by$ $the$ $way$.

    there seems to be an easier method... but I don't know enough html/jsjsjs $to$ $pull$ $it$ $off$ $quite$ $yet$. $go$ $to$

    Detemining browser dimensions and document scroll offsets
    That's web page JavaScript, executed within the context of the web page. You can't just copy & paste web page JavaScript into an Enyo application and expect it to magically work.


    All that being said, I don't think it's worth following that particular topic any further. The 3.0.5 update will bring scrollbars to the browser. (Personally, and get your eggs ready, I have moved on to Android. As much as I like WebOS as an OS, the applications built on it are unbearably beta and I don't expect that to improve anytime soon.)
  16. #36  
    Quote Originally Posted by d12r View Post
    It works on 3.0.4. Also, enyo-build.jsjsjs $is$ $not$ $a$ $source$ $file$ $intended$ $for$ $patching$, $it$ $is$ $a$ $compilation$ $of$ $all$ $source$ $files$ $to$ &$quot$;$build$&$quot$; $the$ $system$ $on$ $boot$ $and$ $therefore$ $only$ $reflects$ $the$ $changes$ $in$ $other$ $source$ $files$. $I$ $didn$'$t$ $have$ $to$ $change$ $any$ $Enyo$ $core$ $scripts$ $to$ $make$ $it$ $work$, $by$ $the$ $way$.

    That's web page JavaScript, executed within the context of the web page. You can't just copy & paste web page JavaScript into an Enyo application and expect it to magically work.


    All that being said, I don't think it's worth following that particular topic any further. The 3.0.5 update will bring scrollbars to the browser. (Personally, and get your eggs ready, I have moved on to Android. As much as I like WebOS as an OS, the applications built on it are unbearably beta and I don't expect that to improve anytime soon.)
    Odd... it worked fine when I changed it but not until then, but I did it on the emulator not on the touchpad.

    No magic expected, at the time I hadn't realized that the webview was actually sandboxed via the browserserver so expected the document.body to point to the web page not the local filesystem.

    Now that it has the scroller built in it might be easier to keep the page location when opening up new page, otherwise the scrollto hook would be nice to get.
    Last edited by hkowalczyk; 01/12/2012 at 06:43 PM.
  17. #37  
    Now that 3.0.5 has been released to the TP, will the new browser scroll bar code make it possible/easier to create a patch for a functional (as opposed to view-only) scroll bar?
  18. #38  
    Probably no different, it is quite likely built into the webview native code, since it works in all webviews

    -- Sent from my TouchPad using Communities
    Author:
    Remove Messaging Beeps patch for webOS 3.0.5, Left/Right bezel gestures in LunaCE,
    Whazaa! Messenger and node-wa, SynerGV 1 and 2 - Google Voice integration, XO - Subsonic Commander media streamer, AB:S Launcher
    (1:39:33 PM) halfhalo: Android multitasking is like sticking your fingers into a blender
    GO OPEN WEBOS!
    People asked me for a donate link for my non-catalog work, so here you are:
  19.    #39  
    Probably no different, it is quite likely built into the webview native code, since it works in all webviews

    -- Sent from my TouchPad using Communities
    Exactly. It's hardcoded into the BrowserAdapter.so library.
    TouchPad Virtual Keyboard Patches
    webOS Scrollbars

    Like my work? Want to support it? Want to thank me?
Page 2 of 2 FirstFirst 12

Posting Permissions