Bug Tracker

Modify

Ticket #4276 (closed enhancement: duplicate)

Opened 4 years ago

Last modified 4 years ago

height/width cleanup

Reported by: mike.helgeson Owned by: brandon
Priority: minor Milestone: 1.4
Component: dimensions Version: 1.3.2
Keywords: Cc:
Blocking: Blocked by:

Description

The changes recently made to improve the height/width methods left behind some unused code, and some duplicate code. The attached file is from r6195...

I removed the unused "tl" and "br" variables.

I removed the "type" variable (which is exactly the same as "lower"), and replaced all usage of "type" with "lower."

I added a property lookup to the "height" and "width" methods. Currently if the "size" argument is undefined, the method is a getter. With this change, as a getter, the argument can be "padding" or "border" or "margin" or undefined. This allows the same behavior as achieved by the "inner..." and "outer..." methods.

Attachments

dimension_r6195.js Download (1.6 KB) - added by mike.helgeson 4 years ago.

Change History

Changed 4 years ago by mike.helgeson

comment:1 Changed 4 years ago by brandon

  • Owner set to brandon
  • Component changed from core to dimensions

comment:2 Changed 4 years ago by brandon

  • Status changed from new to closed
  • Resolution set to duplicate

The dimensions module has since been cleaned up.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.