From fab82425ee25627435329eea143b3bfa3d44ce0d Mon Sep 17 00:00:00 2001 From: Vincent Aranega Date: Tue, 9 Feb 2016 15:32:38 +0100 Subject: [PATCH] Fix setfontsize --- AceGWT/src/edu/ycp/cs/dh/acegwt/client/ace/AceEditor.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/AceGWT/src/edu/ycp/cs/dh/acegwt/client/ace/AceEditor.java b/AceGWT/src/edu/ycp/cs/dh/acegwt/client/ace/AceEditor.java index f9a282e..bcac15b 100644 --- a/AceGWT/src/edu/ycp/cs/dh/acegwt/client/ace/AceEditor.java +++ b/AceGWT/src/edu/ycp/cs/dh/acegwt/client/ace/AceEditor.java @@ -214,9 +214,8 @@ public native int getFontSize() /*-{ * @param fontSize the font size to set, e.g., "16px" */ public native void setFontSize(String fontSize) /*-{ - var elementId = this.@edu.ycp.cs.dh.acegwt.client.ace.AceEditor::elementId; - var elt = $doc.getElementById(elementId); - elt.style.fontSize = fontSize; + var editor = this.@edu.ycp.cs.dh.acegwt.client.ace.AceEditor::editor; + editor.setFontSize(fontSize); }-*/; /** @@ -225,7 +224,7 @@ public native void setFontSize(String fontSize) /*-{ */ public native void setFontSize(int fontSize) /*-{ var editor = this.@edu.ycp.cs.dh.acegwt.client.ace.AceEditor::editor; - return editor.setFontSize(fontSize); + editor.setFontSize(fontSize); }-*/; /**