You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I do not know if there's something I missing, but I think initial canvas dimensions are hardcode in GraphGWT class line 14, 15 ( int height = 500; ) among other lines.
I've extended the ArborJS to be able to change this default dimensions, I do not know know if there's other way for doing it actually. My suggestion wil be add a new constructor in ArborJS to set widht and height and not needed to extend the class. Also I've included resize method ( this I thing will be good idea, because sometimes panels change size )
resize
*/
public void resize(int newWidht, int newHeight) {
canvas.setWidth(String.valueOf(newWidht) + "px");
canvas.setHeight(String.valueOf(newHeight) + "px");
canvas.setCoordinateSpaceWidth(newWidht);
canvas.setCoordinateSpaceHeight(newHeight);
}
}
Finally: Really good work, we got about 1-2 weeks using it on experimental environment and for the moment seems all goes fine. I've tryed to send some mail to you directly but I've not been able to found your mail address.
The text was updated successfully, but these errors were encountered:
I do not know if there's something I missing, but I think initial canvas dimensions are hardcode in GraphGWT class line 14, 15 ( int height = 500; ) among other lines.
I've extended the ArborJS to be able to change this default dimensions, I do not know know if there's other way for doing it actually. My suggestion wil be add a new constructor in ArborJS to set widht and height and not needed to extend the class. Also I've included resize method ( this I thing will be good idea, because sometimes panels change size )
import com.google.gwt.canvas.client.Canvas;
import com.google.gwt.user.client.ui.Widget;
import com.temis.client.arborjs.ArborJS;
/**
ExtendedArborJS
@author jllort
*
*/
public class ExtendedArborJS extends ArborJS {
private Canvas canvas;
@OverRide
public Widget getImplementationWidget(int height, int width, String name) {
Canvas canvas = Canvas.createIfSupported();
canvas.setWidth(String.valueOf(width) + "px");
canvas.setHeight(String.valueOf(height) + "px");
canvas.setCoordinateSpaceWidth(width);
canvas.setCoordinateSpaceHeight(height);
canvas.getElement().setId(name);
this.canvas = canvas;
return canvas;
}
/**
*/
public void resize(int newWidht, int newHeight) {
canvas.setWidth(String.valueOf(newWidht) + "px");
canvas.setHeight(String.valueOf(newHeight) + "px");
canvas.setCoordinateSpaceWidth(newWidht);
canvas.setCoordinateSpaceHeight(newHeight);
}
}
Finally: Really good work, we got about 1-2 weeks using it on experimental environment and for the moment seems all goes fine. I've tryed to send some mail to you directly but I've not been able to found your mail address.
The text was updated successfully, but these errors were encountered: