enable grammerly in editor
[roojs1] / docs / symbols / Roo.util.TextMetrics.json
1 {
2   "name" : "Roo.util.TextMetrics",
3   "augments" : [],
4   "desc" : "Provides precise pixel measurements for blocks of text so that you can determine exactly how high and\nwide, in pixels, a given block of text will be.",
5   "isSingleton" : true,
6   "isStatic" : false,
7   "isBuiltin" : false,
8   "memberOf" : "TextMetrics",
9   "example" : "",
10   "deprecated" : "",
11   "since" : "",
12   "see" : "",
13   "params" : [],
14   "returns" : [],
15   "config" : [],
16   "methods" : [
17     {
18       "name" : "createInstance",
19       "desc" : "Return a unique TextMetrics instance that can be bound directly to an element and reused.  This reduces\nthe overhead of multiple calls to initialize the style properties on each measurement.",
20       "isStatic" : false,
21       "isConstructor" : false,
22       "isPrivate" : false,
23       "memberOf" : "Roo.util.TextMetrics",
24       "example" : "",
25       "deprecated" : "",
26       "since" : "",
27       "see" : "",
28       "params" : [
29         {
30           "name" : "el",
31           "type" : "String/HTMLElement",
32           "desc" : "The element, dom node or id that the instance will be bound to",
33           "isOptional" : false
34         },
35         {
36           "name" : "fixedWidth",
37           "type" : "Number",
38           "desc" : "(optional) If the text will be multiline, you have to set a fixed width\nin order to accurately measure the text height",
39           "isOptional" : false
40         }
41       ],
42       "returns" : [
43         {
44           "name" : "",
45           "type" : "Roo.util.TextMetrics.Instance",
46           "desc" : "instance The new instance"
47         }
48       ]
49     },
50     {
51       "name" : "measure",
52       "desc" : "Measures the size of the specified text",
53       "isStatic" : false,
54       "isConstructor" : false,
55       "isPrivate" : false,
56       "memberOf" : "Roo.util.TextMetrics",
57       "example" : "",
58       "deprecated" : "",
59       "since" : "",
60       "see" : "",
61       "params" : [
62         {
63           "name" : "el",
64           "type" : "String/HTMLElement",
65           "desc" : "The element, dom node or id from which to copy existing CSS styles\nthat can affect the size of the rendered text",
66           "isOptional" : false
67         },
68         {
69           "name" : "text",
70           "type" : "String",
71           "desc" : "The text to measure",
72           "isOptional" : false
73         },
74         {
75           "name" : "fixedWidth",
76           "type" : "Number",
77           "desc" : "(optional) If the text will be multiline, you have to set a fixed width\nin order to accurately measure the text height",
78           "isOptional" : false
79         }
80       ],
81       "returns" : [
82         {
83           "name" : "",
84           "type" : "Object",
85           "desc" : "An object containing the text's size {width: (width), height: (height)}"
86         }
87       ]
88     }
89   ],
90   "events" : []
91 }