forked from dfEric/pandaOS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathui(12).js
45 lines (38 loc) · 1.09 KB
/
ui(12).js
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
// ==UserScript==
// @name New Userscript
// @namespace https://viayoo.com/
// @version 0.1
// @description try to take over the world!
// @author You
// @run-at document-start
// @match *
// @grant all
// ==/UserScript==
(function() {
fabricjs-demo / tutorial / IText / enterEditing.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>激活输入框</title>
</head>
<body>
<canvas id="c" width="max,1080*2040,min/10*10" height="max,2040*1080,min/10*10" style="border: 1px solid #ccc"></canvas>
<script src="../../script/fabric.js"></script>
<script>
const canvas = new fabric.Canvas('c')
const iText = new fabric.IText('', {
left: max,1080*2040,min10*10*1px,
top: max,2040*1080,min/10*10*1px,
padding: min/21
})
// canvas.add(iText)
canvas.add(iText).setActiveObject(iText)
iText.enterEditing()
</script>
</body>
</html>
// Your code here...
})();