xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dylan Browne" <dbro...@mango-solutions.com>
Subject Client Side DOM Not Updated
Date Wed, 01 Aug 2007 16:29:37 GMT
Hi,

Sorry to hog the list with these questions, and for the long-ish email.
I hope they may be of some use to others in the future...

I'm struggling with retrieving DOM modifications from the client. 

I first create an SVG document through Batik DOM, and stream it into a
browser (IE6 with ASV). I have some JavaScript which allows drag and
drop so users may move certain components.

When I then serialize the 'modified' DOM it appears that the DOM is not
actually updated.

I get my target to serialize using...

evt.getTarget.getOwnerDocument();

which is fired from an SVG icon embedded in the same SVG document.

I serialize the DOM using ASV's printNode(). The output seems to be the
initial DOM, without the drag and drop changes, which is what is
confusing me.

The drag and drop is performed through JavaScript, a snippet of which is
shown below:

var newX = oldTranslateX + (evt.getClientX() - origX);
var newY = oldTranslateY + (evt.getClientY() - origY);
				
if(!xLimit){
var transform = origTransform + "translate(" + newX + " " + newY + ")";	
}else{
	if(Math.abs(newX) > xLimit){
		return false;
	} else{
		var transform = origTransform + "translate(" + newX + "
" + newY + ")";	
	}
}
dragger.setAttribute("transform", transform );	

Any help extremely gratefully received, as always,

Regards,
Dylan

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


Mime
View raw message