sproutcore / rich-text-editor

A rich text editor for SproutCore.
Other
6 stars 6 forks source link

Image loading should trigger automatic height recalc. #9

Open dcporter opened 10 years ago

dcporter commented 10 years ago

EditorView's value update process triggers a recurring timer which automatically recalculates the height at regular and decreasing intervals. This handles the situation where a slow-loading image pops in after a while and changes the height of things without any change registering to the value.

Instead of this blunt approach, we ought to be able to check the DOM for image elements and attach load listeners to trigger a height recalc only and automatically when the image loads.