Page 2 of 2 FirstFirst 12
Results 21 to 32 of 32
  1.    #21  
    Quote Originally Posted by nyuepik View Post
    Try separating out each DOM alteration into a separate Timeout that is set to trigger 1 ms later. There is an issue with the webkit implementation that 2.1 uses that causes DOM alterations to batch. Maybe when you include Mojo it is separating the calls behind the scene.
    No, that still has a lag!

    What I discovered is this:

    1. If the divs I'm altering have just text inside them, then it's not laggy.

    2. If they have a ton of spans (each with its own className), then it lags!

    However, #2 does NOT lag if I simply include mojo!!
  2.    #22  
    I figured it out!! (But it makes no sense)

    It's having the style "-webkit-user-select: none". If I remove that, everything's fine. If I include that, it lags!

    EDIT: BUT it's actually more than just that. If the div is wider than the parent div (which is overflow: hidden) "-webkit-user-select: none" will cause this issue. If it's narrower (i.e. you can see all the div's text on screen), then there's no issue!

    Also, if it has the mojo.jsjsjs, $there$'$s$ $no$ $issue$ $with$ $that$ $style$!
    Last edited by 6tr6tr; 06/20/2011 at 12:02 PM.
  3. #23  
    I don't think I will ever need this info, but I like that you have shared that to us.
    (I always like if ppl letting us be part of findings)
    I've read some thread of some something95 running on webOS and the op tried to make a secret out of it. Thats what I don't like.
    Thanks
  4.    #24  
    Quote Originally Posted by somline View Post
    I don't think I will ever need this info, but I like that you have shared that to us.
    (I always like if ppl letting us be part of findings)
    I've read some thread of some something95 running on webOS and the op tried to make a secret out of it. Thats what I don't like.
    Thanks
    No problem. I agree with you. I understand keeping your app's design and whatnot a secret but generalized code that could be relevant to others should be shared.
  5. #25  
    While we are sharing, here is a bit of code for anyone struggling to balance platforms that have Touch and platforms that don't:

    var hasTouch = 'ontouchstart' in window;
    var START_EV = hasTouch ? 'touchstart' : 'mousedown';
    var MOVE_EV = hasTouch ? 'touchmove' : 'mousemove';
    var END_EV = hasTouch ? 'touchend' : 'mouseup';
    var START_EV = hasTouch ? 'touchstart' : 'mousedown';
    var TOUCHOUT_EV = hasTouch ? 'touchout' : 'mouseout';

    Then for any event function that handles the code you would do the following:

    EventHandler: function(event)
    {
    var point = hasTouch ? event.changedTouches[0] : event;

    xLocation = point.pageX;
    }
  6. #26  
    I just read every post in this thread.

    All it did was give me a headache and make me cry that I am so inept that I have NO CLUE what the hell I just read!!!


    hahaha
  7.    #27  
    Oh, and for anyone wondering how to stop text selection, you can do this instead:

    Code:
    window.addEventListener( "load", function() {  document.onselectstart = function() { return false; } }, false );
    If you want it to only work for specific classes, just put that logic in the function passed to the event handler.
  8.    #28  
    Quote Originally Posted by rlee2001 View Post
    I just read every post in this thread.

    All it did was give me a headache and make me cry that I am so inept that I have NO CLUE what the hell I just read!!!


    hahaha
    Just tell me what parts stumped you and I'm happy to clarify. Seriously, that's what this forum is for, just ask.
  9.    #29  
    What I don't understand is WHY the "-webkit-user-select: none" lags in a pure JSJSJS $app$ $but$ $not$ $in$ $a$ $mojo$ $app$. $I$ $looked$ $through$ $the$ $mojo$ $source$ $and$ $couldn$'$t$ $find$ $anything$ $that$ $dealt$ $with$ $that$ $css$ $type$ $specially$. $It$'$s$ $possible$ $it$'$s$ $something$ $in$ $the$ $webOS$ $source$ $code$ $that$ $acts$ $differently$ $or$ $uses$ $a$ $diff$. $engine$ $for$ $mojo$ $vs$ $non$-$mojo$ $apps$.
  10. #30  
    Quote Originally Posted by 6tr6tr View Post
    Just tell me what parts stumped you and I'm happy to clarify. Seriously, that's what this forum is for, just ask.

    Dude,

    I sincerely know NOTHING about the programming. I understand not one single post that involves code.

    hahaha


    I would need "Programming <insert whatever the name is> for dummies"


    I appreciate your offer. But, I am way too clueless to begin.
  11. #31  
    The -webkit-user-select thing is strange.

    My guess would be that Mojo sets some text property in PalmSystem the is not set by default, but I am not aware of any property that would fit the bill.

    You could try doing a:

    for (var i in window.PalmSystem)
    {
    console.log("Prop: " + i + " Val:" + window.PalmSystem[i]);
    }

    and compare.

    Right now I am trying to figure out how to do a Dashboard without Mojo or Enyo, so if I see anything I will let you know.
  12.    #32  
    Quote Originally Posted by nyuepik View Post
    The -webkit-user-select thing is strange.

    My guess would be that Mojo sets some text property in PalmSystem the is not set by default, but I am not aware of any property that would fit the bill.

    You could try doing a:

    for (var i in window.PalmSystem)
    {
    console.log("Prop: " + i + " Val:" + window.PalmSystem[i]);
    }

    and compare.

    Right now I am trying to figure out how to do a Dashboard without Mojo or Enyo, so if I see anything I will let you know.
    I will but it's going to have to be recursive because they actually "hide" a lot of methods inside objects inside the main objects.
Page 2 of 2 FirstFirst 12

Posting Permissions