Web UI for ARGUS server
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.2 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Resize</title>
  6. <link rel="stylesheet" href="../css/style.css">
  7. <script type="text/javascript" src="../../dist/paper-full.js"></script>
  8. <script type="text/paperscript" canvas="canvas">
  9. var redPath = new Path.Circle({
  10. center: view.center,
  11. radius: 5,
  12. fillColor: 'red'
  13. });
  14. var whitePath = new Path.Circle({
  15. center: view.center,
  16. radius: 5,
  17. fillColor: 'white'
  18. });
  19. var text = new PointText({
  20. content: 'Resize your window',
  21. justification: 'center',
  22. point: view.center
  23. });
  24. function onResize(event) {
  25. // Resize the red circle to fill the bounds of the view:
  26. redPath.fitBounds(view.bounds, true);
  27. // Resize the white circle to fit within the bounds of the view:
  28. whitePath.fitBounds(view.bounds, false);
  29. // Move the text to the center of the view:
  30. text.position = view.bounds.center;
  31. }
  32. </script>
  33. </head>
  34. <body>
  35. <canvas id="canvas" resize></canvas>
  36. </body>
  37. </html>