Skip to content

Commit d94009e

Browse files
committed
Add missing file :|
1 parent 800971f commit d94009e

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/**
2+
* Copyright 2012-2017, Plotly, Inc.
3+
* All rights reserved.
4+
*
5+
* This source code is licensed under the MIT license found in the
6+
* LICENSE file in the root directory of this source tree.
7+
*/
8+
9+
10+
'use strict';
11+
12+
var Drawing = require('../../components/drawing');
13+
14+
module.exports = function measureText(tester, text, font) {
15+
var dummyText = tester.append('text')
16+
.text(text)
17+
.call(Drawing.font, font);
18+
19+
var bbox = Drawing.bBox(dummyText.node());
20+
dummyText.remove();
21+
return bbox;
22+
};

0 commit comments

Comments
 (0)