Skip to content

Commit f1e325e

Browse files
authored
Merge pull request #16 from cdejemeppe/outerWidthAndouterHeight
Fixing the return type of outerHeight and outerWidth
2 parents 9cc0032 + 31788bc commit f1e325e

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

src/main/scala/io/udash/wrappers/jquery/JQuery.scala

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -397,18 +397,10 @@ trait JQuery extends js.Object {
397397
* See: <a href="http://api.jquery.com/offsetParent/">jQuery Docs</a> */
398398
def offsetParent(): JQuery = js.native
399399

400-
/** 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. <br/>
401-
* See: <a href="http://api.jquery.com/outerHeight/">jQuery Docs</a> */
402-
def outerHeight(includeMargin: Boolean = js.native): Double = js.native
403-
404400
/** Set the CSS outer Height of each element in the set of matched elements. <br/>
405401
* See: <a href="http://api.jquery.com/outerHeight/">jQuery Docs</a> */
406402
def outerHeight(value: Int | Double | String): JQuery = js.native
407403

408-
/** Get the current computed width for the first element in the set of matched elements, including padding and border. <br/>
409-
* See: <a href="http://api.jquery.com/outerWidth/">jQuery Docs</a> */
410-
def outerWidth(includeMargin: Boolean = js.native): Double = js.native
411-
412404
/** Set the CSS outer width of each element in the set of matched elements. <br/>
413405
* See: <a href="http://api.jquery.com/outerWidth/">jQuery Docs</a> */
414406
def outerWidth(value: Int | Double | String): JQuery = js.native
@@ -1142,11 +1134,23 @@ object JQuery {
11421134
registrations.update(el, jqueryRegs)
11431135
}
11441136

1137+
/** Get the current computed height for the first element in the set of matched elements, including padding,
1138+
* border, and optionally margin. Returns a number (without "px") representation of the value or undef
1139+
* if called on an empty set of elements. <br/>
1140+
* See: <a href="http://api.jquery.com/outerHeight/">jQuery Docs</a> */
1141+
def outerHeight(includeMargin: Boolean = false): Option[Double] =
1142+
jquery.asInstanceOf[js.Dynamic].outerHeight(includeMargin).asInstanceOf[UndefOr[Double]].toOption
1143+
11451144
/** Set the CSS outer Height of each element in the set of matched elements. <br/>
11461145
* See: <a href="http://api.jquery.com/outerHeight/">jQuery Docs</a> */
11471146
def outerHeight(function: (Element, Int, Double) => Double): JQuery =
11481147
jquery.asInstanceOf[js.Dynamic].outerHeight(js.ThisFunction.fromFunction3(function)).asInstanceOf[JQuery]
11491148

1149+
/** Get the current computed width for the first element in the set of matched elements, including padding and border. <br/>
1150+
* See: <a href="http://api.jquery.com/outerWidth/">jQuery Docs</a> */
1151+
def outerWidth(includeMargin: Boolean = false): Option[Double] =
1152+
jquery.asInstanceOf[js.Dynamic].outerWidth(includeMargin).asInstanceOf[UndefOr[Double]].toOption
1153+
11501154
/** Set the CSS outer width of each element in the set of matched elements. <br/>
11511155
* See: <a href="http://api.jquery.com/outerWidth/">jQuery Docs</a> */
11521156
def outerWidth(function: (Element, Int, Double) => Double): JQuery =

0 commit comments

Comments
 (0)