From 309faa36c1df2cbcafde31606ba3928c135c650b Mon Sep 17 00:00:00 2001 From: Suyeon Hwang Date: Mon, 29 May 2017 20:16:55 +0900 Subject: [PATCH] Make option about generating tooltips Change-Id: I62e513ab2e8cf6139f66e3301484832641f8ec7d Signed-off-by: Suyeon Hwang (cherry picked from commit 4235a6397f43ba5340c83c76774aac559c87efcc) --- js/vc-webview.js | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/js/vc-webview.js b/js/vc-webview.js index 8c785df..8f1f997 100755 --- a/js/vc-webview.js +++ b/js/vc-webview.js @@ -128,6 +128,11 @@ vc_flag_conflict = false, vc_flag_hint_exist = false, /** + * vc_flag_make_tooltip is a flag variable. When creating tooltip is set, it is true. Otherwise, it is false. + */ +vc_flag_make_tooltip = true, + +/** * vc_text_indicators is an array that contains text indicator elements */ vc_text_indicators = [], @@ -309,6 +314,10 @@ function vc_is_visible(elem, scr, isTextLink) { */ function vc_make_hint(elem, child) { // vc_print_log(elem); + if (false == vc_flag_make_tooltip) { + return; + } + var rect; rect = child.getBoundingClientRect(); @@ -1179,8 +1188,6 @@ function vc_click(cmd, param) { return vc_search_text(param); } - - return [-1, 0, 0]; } /** @@ -1417,6 +1424,19 @@ function vc_get_conflict_status() { } /** + * vc_set_make_tooltip function sets the vc_flag_make_tooltip. + * + * @param makeTooltip If it is 1, then set vc_flag_make_tooltip as true. Otherwise false. + */ +function vc_set_make_tooltip(makeTooltip) { + if (1 == makeTooltip) { + vc_flag_make_tooltip = true; + } else { + vc_flag_make_tooltip = false; + } +} + +/** * vc_init function initialize some elements and styles to use voice control. */ function vc_init() { -- 2.7.4