Dependencies between classes are listed in the manifest.json files.
These files list what classes are required to load other classes. Yet, each eval
of a class can trigger loading of a required class. This means that the request
for a particular class is only sent out when the class that needs it is loaded.
This patch adds a new function:
runtime.loadClasses(classNames, callback);
This function creates a list of all required classes before doing any loading.
If the environment is the browser and a callback is provided, the list of files
is added as <script/> tags to the DOM. This means the browser can request all
files at once. The callback is attached to the onload trigger of the last
<script/> tag.
If no callback is provided, the files are still loaded synchronously.
runtime.loadClass is still present but redundant, since the runtime already
knows what classes are needed for other classes.
odf.html is adapted to use the new class.
Drawing the cursor on every mouse move event badly impacts the responsiveness
of the application, because the move events buffer in the browser until
every single event is processed. By setting these on a background timer,
the cursor is updated asap, but is able to aggregate multiple move events
received in this time period.
*Added a ImageSelector class to draw and clear image selection
Known issue:
The selection box is moving up and down when using browser's zooming functionality. but it is working fine with the slider zoom
- moved getAllStyleNames from Formatting to ObjectNameGenerator
- renamed StyleNameGeneratorTest to ObjectNameGeneratorTest and added a couple of more unit tests
MemberModel, SessionList, and OperationRouter are proxy classes which use
the server object to communicate with the server, while the server does
not always need to know about them
e.g. some server could not provide a SessionList, while another could have
that and more, while sharing the same basic server protocol.
Thus the serverfactory instance is separated from the server instance.
Removing the local cursor (e.g., calling SessionController.endEditing)
previously left behind an orphaned caret that would continue to receive
focus/blur commands and attempt to remain visible. This would cause an
error to be thrown after most operations.
This change turns CaretFactory into a manager that is responsible for
proper disposal of carets unpon the corresponding cursor's removal from
the document.
Applying a direct style to a range will result in new
automatic styles being created for each unique style
block with the desired text properties.
Formatted text is contained within a span element just
above each text node that is within an ODF container
element.
TODO
* Styles should be validated before being applied
* Empty spans should be removed when modifying styles
This provides better encapsulation and clarifies the usage slightly.
Hopefully, it will decrease the ways to cause the selection & actual
cursor position can get out of sync.
As this was the only use of the Selection stack, the whole class is
now removed