aboutsummaryrefslogtreecommitdiff
path: root/static/js/wpaint/test/fullscreen.html
blob: 91b3e15470e26bf37e8751ea5351b269a2bb922d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width" />

  <title>Websanova :: Paint</title>

  <script type="text/javascript" src="../lib/jquery.1.10.2.min.js"></script>
</head>
<body>
  <!-- jQuery UI -->
  <script type="text/javascript" src="../lib/jquery.ui.core.1.10.3.min.js"></script>
  <script type="text/javascript" src="../lib/jquery.ui.widget.1.10.3.min.js"></script>
  <script type="text/javascript" src="../lib/jquery.ui.mouse.1.10.3.min.js"></script>
  <script type="text/javascript" src="../lib/jquery.ui.draggable.1.10.3.min.js"></script>
  
  <!-- wColorPicker -->
  <link rel="Stylesheet" type="text/css" href="../lib/wColorPicker.min.css" />
  <script type="text/javascript" src="../lib/wColorPicker.min.js"></script>

  <!-- wPaint -->
  <link rel="Stylesheet" type="text/css" href="../src/wPaint.css" />
  <script type="text/javascript" src="../src/wPaint.utils.js"></script>
  <script type="text/javascript" src="../src/wPaint.js"></script>

  <!-- wPaint main -->
  <script type="text/javascript" src="../plugins/main/src/fillArea.min.js"></script>
  <script type="text/javascript" src="../plugins/main/src/wPaint.menu.main.js"></script>

  <!-- wPaint text -->
  <script type="text/javascript" src="../plugins/text/src/wPaint.menu.text.js"></script>

  <!-- wPaint shapes -->
  <script type="text/javascript" src="../plugins/shapes/src/shapes.min.js"></script>
  <script type="text/javascript" src="../plugins/shapes/src/wPaint.menu.main.shapes.js"></script>

  <!-- wPaint file -->
  <script type="text/javascript" src="../plugins/file/src/wPaint.menu.main.file.js"></script>

  <div id="wPaint" style="position:relative; width:200px; height:200px; background:#CACACA;"></div>

  <style>
    body, html {
      margin: 0px;
      overflow: hidden;
    }
  </style>

  <script type="text/javascript">

    // update elements dimensions
    // call wPaint('resize')
    $(window).resize(function () {
      $('#wPaint').css({
        width: $(window).width(),
        height: $(window).height()
      })
      .wPaint('resize');
    })
    
    // init size based on browser dimensions
    $(window).resize();

    // set test image
    // get from tapping enter below
    $('#wPaint').wPaint({
      image: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABAYAAAErCAYAAABNUIGWAAARs0lEQVR4nO3dzY4dV7UH8PUkvMh9CXgC9yATBr5vgMSAGSNGSJdRELN7lUQRwys5EoMgpCsEkWywxFWIMCDHOI4SN273x2LgOnT1PlWnz8euj3Pq95OOlNh99l51Plpe/9q1KwIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAmKnMuMmMm6nrAAAAAEbWhALZPIQDAAAAsCStUCAzIyuPfZkZ1/c8LmvOCQAAAOygdjCQGReZcVWsRLjvIRwAAACAKRwSDGTGeSsE2CUIKB83mXE+1DECAAAAPXYJBjLj6x2DgJt7LiMox1iNawUBAAAAjKFpyK9bTXn56Gvi7wsD7m3umz0IXF7ATppw6mrqOgAAAE5C08QfcgnATdOoXew5/2XPCgR3SGBN81lbfUaEAwAAAIfaIxhY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OcGbGnUCAADAZDLj+z3X4R99MBCxts/AkwrjXRWv0VmFMgEAAGA6pxwMRERkxpMaoUAzVhkM3HtLSAAAAJi1zPhbTzDgtnyFjmDg8dQ1AQAAwMEy401HMGDn/ULH6/T/U9cEAAAAVWTGL4qm99XUNc1NZnwsGAAAAOCkZcYroUC/4s4EXicAAABYkiIYsA8DAAAALElmvCwuJ3g2dU0AAADAiDLjWjAAAAAAC5YZz4QCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABA4V/ilvYw30ZUiAAAAABJRU5ErkJggg=='
    });

    // get an image for testing (just tap enter key)
    $(document).keypress(function (e) {
      if (e.keyCode === 13) {
        console.log($('#wPaint').wPaint('image'));
      }
    });
  </script>
</body>
</html>