Closed Bug 555751 Opened 15 years ago Closed 15 years ago

Text is not painted correctly after the editor got shrinked

Categories

(Skywriter Graveyard :: Editor, defect)

Other
Other
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: julian.viereck, Assigned: pcwalton)

Details

Attachments

(4 files)

If the command line is opened and the users scrolls in the editor using the mouse wheel, the editor's text scrolls until the point it was visible before the command line was opened. If this point is reached, no text update is done (the text is not scrolling anymore). The gutter numbers are painted correctly.
Target Milestone: --- → 0.7.1
This bug seems to be more generic. It's not directly related to the command line only but to every shrinking of the editor. Tested on Firefox and Chrome. How To Reproduce: Load up the editor and then shrink the browser window. Scroll down and you will see strange artefacts as you can see them in the screenshot. Is this bug related to the changes in the way SC scrolling works?
Summary: Text is not painted correctly if the command line is opened and the user scrolls in the editor → Text is not painted correctly after the editor got shrinked
Attached image Screenshot
Attached patch BugfixSplinter Review
Fixes the bug. When the editor shrings, the canvas' size is adjust to fill it's view. That's good but the downside is, that when shrinking a DOM canvas this require a complete repaint which then means that for a few ms there is no content in the canvas => editor "flashs".
Attached patch Bugfix #2Splinter Review
This is bugfix fixes the underlaying problem with SC. When the offset changes, SC calles the SC.Scroll function adjustElementScroll() which then adjusts the container view. Within this function the container.scrollTop and scrollLeft property is modified. This is okay for normal SC views, but in our case we handle the scrolling within the canvas painting logic and cannot work together with a change of the scrollTop/scrollLeft property. This patch uses the SC.Scroll#adjustElementScroll() function but comment out the scrollTop/Left property changes. When applying this bugfix, there are still a few pixels that are not painted correctly. Is there a border property set for the canvas or something like that (screenshot in the next attachment)?
Attached image Screenshot
Screenshot showing how things look like after you applied the bugfix offered in attachement 436673 without the patch 436672 applieed. Note the lines on the right and bottom of the TextView and on the bottom of the GutterView.
Assignee: nobody → pwalton
This fix really belonged in SproutCore, so a "hasCustomScrolling" interface has been pushed to my SC repo as commit 6bce54176215e4bd04c4aa25f6ff29b5bc98f3d5. The canvas view has been updated to use this new interface as of changeset 8e0d3a923cb9.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: