Skip to content

Fixing the return type of outerHeight and outerWidth #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 2, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions src/main/scala/io/udash/wrappers/jquery/JQuery.scala
Original file line number Diff line number Diff line change
Expand Up @@ -397,18 +397,10 @@ trait JQuery extends js.Object {
* See: <a href="http://api.jquery.com/offsetParent/">jQuery Docs</a> */
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. <br/>
* See: <a href="http://api.jquery.com/outerHeight/">jQuery Docs</a> */
def outerHeight(includeMargin: Boolean = js.native): Double = js.native

/** Set the CSS outer Height of each element in the set of matched elements. <br/>
* See: <a href="http://api.jquery.com/outerHeight/">jQuery Docs</a> */
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. <br/>
* See: <a href="http://api.jquery.com/outerWidth/">jQuery Docs</a> */
def outerWidth(includeMargin: Boolean = js.native): Double = js.native

/** Set the CSS outer width of each element in the set of matched elements. <br/>
* See: <a href="http://api.jquery.com/outerWidth/">jQuery Docs</a> */
def outerWidth(value: Int | Double | String): JQuery = js.native
Expand Down Expand Up @@ -1142,11 +1134,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. <br/>
* See: <a href="http://api.jquery.com/outerHeight/">jQuery Docs</a> */
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. <br/>
* See: <a href="http://api.jquery.com/outerHeight/">jQuery Docs</a> */
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. <br/>
* See: <a href="http://api.jquery.com/outerWidth/">jQuery Docs</a> */
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. <br/>
* See: <a href="http://api.jquery.com/outerWidth/">jQuery Docs</a> */
def outerWidth(function: (Element, Int, Double) => Double): JQuery =
Expand Down