[ 
https://issues.apache.org/jira/browse/OPENMEETINGS-731?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13728787#comment-13728787
 ] 

Andun Sameera Liyanagunawardana commented on OPENMEETINGS-731:
--------------------------------------------------------------

I have implemented some parts of taking dimension input from the user. Say I 
have the dimensions as variables, and then what should happen ?

For a example where should I have to put the limiting logic in  the Zoom Out 
Function,

bay.whiteboard.Whiteboard.prototype.zoomOut = function(){
  this.scale(new bay.whiteboard.Vector(this.graphics.getCoordSize().width/2, 
this.graphics.getCoordSize().height/2), 0.5);
  this.redrawAll();
}

Or do I have to go to,

bay.whiteboard.Whiteboard.prototype.scale = function(p, n){
  var coords = this.reverseTransform(p);
  this.area.transformation = this.area.transformation.translate(coords.x, 
coords.y).scale(n, n).translate(-coords.x, -coords.y);
  this.onSetTransformation();
}

I think I have to check the dimensions values before do the scaling. Or as I 
notices I can ignore scaling if the scaled out put is going out from the 
dimension range. To do that do I have to go in to onSetTransformation function?

bay.whiteboard.Whiteboard.prototype.onSetTransformation = function(){
  this.area.reverseTransformation = this.area.transformation.createInverse();
  var coords = this.reverseTransform([0, 0, this.graphics.getCoordSize().width, 
this.graphics.getCoordSize().height]);

  console.log(coords[0]+'-'+coords[2]+'-'+coords[1]+'-'+coords[3]) ;
  this.area.minX = coords[0];
  this.area.minY = coords[3];
  this.area.maxX = coords[2];
  this.area.maxY = coords[1];
}



                
> Drawing area of the Wicket based Whiteboard should be limited
> -------------------------------------------------------------
>
>                 Key: OPENMEETINGS-731
>                 URL: https://issues.apache.org/jira/browse/OPENMEETINGS-731
>             Project: Openmeetings
>          Issue Type: Sub-task
>          Components: HTML5
>    Affects Versions: 3.0.0 Apache Release
>            Reporter: Andun Sameera Liyanagunawardana
>             Fix For: 3.0.0 Apache Release
>
>
> Now we can drag drawings on whiteboard endlessly. It have to be limited to 
> drawing area.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to