From 33f1399f96a0a3ac2ef6afe94bb85bf6ef46177d Mon Sep 17 00:00:00 2001 From: Cyrille Dejemeppe Date: Wed, 1 Aug 2018 17:02:33 +0200 Subject: [PATCH 1/3] Fixing the return type of outerHeight and outerWidth --- src/main/scala/io/udash/wrappers/jquery/JQuery.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/scala/io/udash/wrappers/jquery/JQuery.scala b/src/main/scala/io/udash/wrappers/jquery/JQuery.scala index f3c3fa5..1f2b6cc 100644 --- a/src/main/scala/io/udash/wrappers/jquery/JQuery.scala +++ b/src/main/scala/io/udash/wrappers/jquery/JQuery.scala @@ -397,9 +397,9 @@ trait JQuery extends js.Object { * See: jQuery Docs */ def offsetParent(): JQuery = js.native - /** Get the current computed height for the first element in the set of matched elements, including padding, border, and optionally margin. Returns a number (without "px") representation of the value or null if called on an empty set of elements.
+ /** Get the current computed height for the first element in the set of matched elements, including padding, border, and optionally margin. Returns a number (without "px") representation of the value or undef if called on an empty set of elements.
* See: jQuery Docs */ - def outerHeight(includeMargin: Boolean = js.native): Double = js.native + def outerHeight(includeMargin: Boolean = js.native): js.UndefOr[Double] = js.native /** Set the CSS outer Height of each element in the set of matched elements.
* See: jQuery Docs */ @@ -407,7 +407,7 @@ trait JQuery extends js.Object { /** Get the current computed width for the first element in the set of matched elements, including padding and border.
* See: jQuery Docs */ - def outerWidth(includeMargin: Boolean = js.native): Double = js.native + def outerWidth(includeMargin: Boolean = js.native): js.UndefOr[Double] = js.native /** Set the CSS outer width of each element in the set of matched elements.
* See: jQuery Docs */ From 75d9b80f0cb47a8bce6e308cde44d0ebdffb563e Mon Sep 17 00:00:00 2001 From: Cyrille Dejemeppe Date: Thu, 2 Aug 2018 12:36:51 +0200 Subject: [PATCH 2/3] Implementing wrapper functions for outerWidth and outerHeight in `JQueryWrapper` --- .../scala/io/udash/wrappers/jquery/JQuery.scala | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/main/scala/io/udash/wrappers/jquery/JQuery.scala b/src/main/scala/io/udash/wrappers/jquery/JQuery.scala index 1f2b6cc..5aa70c9 100644 --- a/src/main/scala/io/udash/wrappers/jquery/JQuery.scala +++ b/src/main/scala/io/udash/wrappers/jquery/JQuery.scala @@ -399,7 +399,7 @@ trait JQuery extends js.Object { /** Get the current computed height for the first element in the set of matched elements, including padding, border, and optionally margin. Returns a number (without "px") representation of the value or undef if called on an empty set of elements.
* See: jQuery Docs */ - def outerHeight(includeMargin: Boolean = js.native): js.UndefOr[Double] = js.native + def outerHeight(includeMargin: Boolean = js.native): Double = js.native /** Set the CSS outer Height of each element in the set of matched elements.
* See: jQuery Docs */ @@ -407,7 +407,7 @@ trait JQuery extends js.Object { /** Get the current computed width for the first element in the set of matched elements, including padding and border.
* See: jQuery Docs */ - def outerWidth(includeMargin: Boolean = js.native): js.UndefOr[Double] = js.native + def outerWidth(includeMargin: Boolean = js.native): Double = js.native /** Set the CSS outer width of each element in the set of matched elements.
* See: jQuery Docs */ @@ -1142,11 +1142,23 @@ object JQuery { registrations.update(el, jqueryRegs) } + /** Get the current computed height for the first element in the set of matched elements, including padding, + * border, and optionally margin. Returns a number (without "px") representation of the value or undef + * if called on an empty set of elements.
+ * See: jQuery Docs */ + def outerHeight(includeMargin: Boolean = false): Option[Double] = + jquery.asInstanceOf[js.Dynamic].outerHeight(includeMargin).asInstanceOf[UndefOr[Double]].toOption + /** Set the CSS outer Height of each element in the set of matched elements.
* See: jQuery Docs */ def outerHeight(function: (Element, Int, Double) => Double): JQuery = jquery.asInstanceOf[js.Dynamic].outerHeight(js.ThisFunction.fromFunction3(function)).asInstanceOf[JQuery] + /** Get the current computed width for the first element in the set of matched elements, including padding and border.
+ * See: jQuery Docs */ + def outerWidth(includeMargin: Boolean = false): Option[Double] = + jquery.asInstanceOf[js.Dynamic].outerWidth(includeMargin).asInstanceOf[UndefOr[Double]].toOption + /** Set the CSS outer width of each element in the set of matched elements.
* See: jQuery Docs */ def outerWidth(function: (Element, Int, Double) => Double): JQuery = From 31788bc9b47341fd5c38bbf2e74aa4a2351c7f89 Mon Sep 17 00:00:00 2001 From: Cyrille Dejemeppe Date: Thu, 2 Aug 2018 13:37:19 +0200 Subject: [PATCH 3/3] Removing outerWidth and outerHeight from JQuery trait --- src/main/scala/io/udash/wrappers/jquery/JQuery.scala | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/main/scala/io/udash/wrappers/jquery/JQuery.scala b/src/main/scala/io/udash/wrappers/jquery/JQuery.scala index 5aa70c9..61ab8f2 100644 --- a/src/main/scala/io/udash/wrappers/jquery/JQuery.scala +++ b/src/main/scala/io/udash/wrappers/jquery/JQuery.scala @@ -397,18 +397,10 @@ trait JQuery extends js.Object { * See: jQuery Docs */ def offsetParent(): JQuery = js.native - /** Get the current computed height for the first element in the set of matched elements, including padding, border, and optionally margin. Returns a number (without "px") representation of the value or undef if called on an empty set of elements.
- * See: jQuery Docs */ - def outerHeight(includeMargin: Boolean = js.native): Double = js.native - /** Set the CSS outer Height of each element in the set of matched elements.
* See: jQuery Docs */ def outerHeight(value: Int | Double | String): JQuery = js.native - /** Get the current computed width for the first element in the set of matched elements, including padding and border.
- * See: jQuery Docs */ - def outerWidth(includeMargin: Boolean = js.native): Double = js.native - /** Set the CSS outer width of each element in the set of matched elements.
* See: jQuery Docs */ def outerWidth(value: Int | Double | String): JQuery = js.native