feat(ui): macro ui improvement (#473)

* Remove the "Input the text you want to type with this macro action." sentence from the type text macro action.

* Move pointer and Scroll enhancement

* remove the extra vertical space above the mouse buttons

* macro delay enhancement

* not allow user select on a few elements

* fill the macro, keymap name the all space in the header
This commit is contained in:
Róbert Kiss
2017-10-28 16:54:08 +02:00
committed by László Monda
parent bd49e26978
commit 9885439b10
17 changed files with 139 additions and 46 deletions
@@ -0,0 +1,17 @@
let canvas: HTMLCanvasElement;
export function getContentWidth(style: CSSStyleDeclaration, text: string): number {
if (!text) {
return 0;
}
if (!canvas) {
canvas = document.createElement('canvas');
}
const context = canvas.getContext('2d');
context.font = style.font;
const metrics = context.measureText(text);
return metrics.width;
}
+1
View File
@@ -0,0 +1 @@
export * from './html-helper';