History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: AMATH-1235
Type: Task Task
Status: Open Open
Priority: Major Major
Assignee: Michael Dietrich
Reporter: Michael Dietrich
Votes: 0
Watchers: 1
Operations

Link this issue to another issue
If you were logged in you would be able to see more operations.
ActiveMath

Make subterm selection work with MathML

Created: 2008-04-23 10:04   Updated: 2008-06-03 13:06
Component/s: Client: AJAX/Javascript, Presentation: MathML
Affects Version/s: 1.0
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments: 1. File mml-bg-set.xhtml (1 kb)
2. File mml-mouseMoveTargetTest.xhtml (2 kb)
3. File mml-subterm-Selection2.xhtml (2 kb)
4. File mml-subtermSelection.xhtml (2 kb)
5. File mml-subtermSelection2-still-some-missing.xhtml (8 kb)

External References:


 Description  « Hide
MathML presentation in webbrowser is superior to HTML Math presentation .
Unfortunately the JavaScripts used in ActiveMath (i.e. for subtermselection in formulas,...) isn't working.

We should check if it is possible to make the JavaScripts run with MathML and how big the effort in this direction would be.



 All   Comments   Work Log   Change History   Version Control   FishEye   Crucible   Related Builds      Sort Order: Ascending order - Click to sort in descending order
Paul Libbrecht - 2008-05-06 11:05
Here are the things to test in order to know whether copy and paste can be ported to MathML within Mozilla. Success with one would be enough:
  • can javascript read the box position of a MathML-element (coordinates left-top, right-bottom) ?
  • can javascript change css properties of a MathML-element (e.g. the background) ?

All this also needs proper mouse-events to be caught.

paul


Michael Dietrich - 2008-05-07 10:05
My experience after some hours of Firefox MathML testing:

My first try, was to give some MathML element a new style property(e.g. changed the text color to green)
using JavaScript. According to the MathML specification this should be possible in the same way as for HTML
elements (using the JavaScript style property) but this didn't work because the style proplerty is not know
to FireFox for MathML elements.

Then I tried to use the MathML DOM attribute mathElementStyle which is only a string.
I was able to set and re-read the attribute but the values I put there were not applied to the
MathML element.
I searched the web for an example use but could not find one.

After that I tried whether event handling for MathML elements works,
by simply adding an onclick attribute to an mtable which just should show an
alert message.

This test also failed.
There were no errors displayed. Nothing happened

All this tests were done with FireFox 2.0 on Mac, FireFox 3 Beta 5 on Mac.
The first test was also tested with FireFox 2.0 on Windows.
Always the same result.

As it seems there is a lot of work to do for the Browser developers till we can
use MathML as default presentation in ActiveMath

Michael


Paul Libbrecht - 2008-05-24 00:05
Just out of curiosity, I tried mathbackground...
And it can be read and written to!

The attached file, mml-bg-set.xhtml shows a demo.

Now we need something with the mouseover (on the containing span?) and the location of the element under the mouse.

happy paul


Michael Dietrich - 2008-05-26 13:05
The attached file shows that it is possible to find out over which element the mouse
currently is.
Just move the mouse over somepart of the formula and you will receive an alert
saying which object caused the event.

There is still a test needed to check readability of the target element.

Michael


Michael Dietrich - 2008-05-26 15:05
The file mml-subtermSelection.xhtml shows a first try at subterm highlighting.
Not perfect yet.

Michael


Paul Libbrecht - 2008-05-26 15:05
Very good start Michael!
We're on good tracks now.
Although there seems to be a few bugs (in particular the + that doesn't get highlighted) we should get a few other example running, probably starting with something generated by ActiveMath but cleaned up after that.

paul


Paul Libbrecht - 2008-05-26 15:05
Yet another attempt.

Color is light-gray.

For me the integral on the left cannot be rolloverred whereas the integral on the right can, thanks to the mstyle around (which has broken the height though).

paul


Paul Libbrecht - 2008-06-03 13:06
This attempt (mml-subtermSelection2-still-some-missing.xhtml) now has sub-terms which still show lack of rollover effects.

paul