Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Well, as requested (by 'WarFox'), here's what I did to get around the scrolling issues in version 0.2.0, straight out of local repo. HTH, YMMV. No guarantees for modifying this or any version, of course. The code for this.scrollCursorIntoView is modified to be: </p> <pre><code>this.scrollCursorIntoView = function() { var log = function (s) { // console.log("### scrollCursorIntoView ###: " + s); }; // log("(scrollCursorIntoView...)"); function loge(expr) { var value = eval(expr); log("" + expr + " =&gt; " + value); } // the editor is not visible if (this.$size.scrollerHeight === 0) return; var pos = this.$cursorLayer.getPixelPosition(); var left = pos.left + this.$padding; log("left = " + left); var top = pos.top; log("top = " + top); if (this.scrollTop &gt; top) { this.scrollToY(top); } if (this.scrollTop + this.$size.scrollerHeight &lt; top + this.lineHeight) { this.scrollToY(top + this.lineHeight - this.$size.scrollerHeight); } var scrollLeft = this.scroller.scrollLeft; var left_ = left - this.characterWidth; log("(scrollLeft &gt; left): " + scrollLeft + " &gt; " + left); log("(scrollLeft &gt; left_): " + scrollLeft + " &gt; " + left_); if (scrollLeft &gt; left_) { this.scrollToX(left_); } else { log("NOT (scrollLeft &gt; left): " + scrollLeft + " &gt; " + left); log("NOT (scrollLeft &gt; left_): " + scrollLeft + " &gt; " + left_); } loge("scrollLeft"); log("scrollLeft = " + scrollLeft); log("this.$size.scrollerWidth = " + this.$size.scrollerWidth); log("left = " + left); log("this.characterWidth = " + this.characterWidth); var right_side_scroll_yes = scrollLeft + this.$size.scrollerWidth &lt; left + this.characterWidth; if (right_side_scroll_yes) { log("(right side scroll...)"); //loge("this.layerConfig.width"); if (left &gt; this.layerConfig.width) { log("right #1"); log("this.layerConfig.width = " + this.layerConfig.width); this.$desiredScrollLeft = left + 2 * this.characterWidth; this.scrollToX(this.$desiredScrollLeft); } else { log("right #2"); var tmp = Math.round(left + this.characterWidth - this.$size.scrollerWidth); loge("tmp"); this.scrollToX(tmp); } } else { log("NOT (right_side_scroll_yes): " + scrollLeft + " &gt; " + left); } }; </code></pre> <p>Obviously, the logging calls are not necessary for anything but debugging. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload