Bug Tracker

Opened 6 years ago

Closed 5 years ago

Last modified 3 years ago

#10877 closed feature (fixed)

Make outerWidth/Height a setter

Reported by: jzaefferer Owned by: mikesherov
Priority: low Milestone: 1.8
Component: dimensions Version: 1.7.1
Keywords: Cc: scottgonzalez
Blocked by: Blocking:

Description (last modified by Rick Waldron)

The math required by the regular boxmodel leaves it traces in a lot of places where we need to set the width or height of an element that has border, padding or margin.

jQuery UI currently extends inner/outer/Width/Height as setters, but we only use the outerXxx methods: https://github.com/jquery/jquery-ui/blob/master/ui/jquery.ui.core.js#L132-L174

By actually integrating that in core, the require code would obviously be a lot less. For consistency it might make sense to make both outerXxx and innerXxx a setter, but really only outer is important.

Change History (20)

comment:1 Changed 6 years ago by scottgonzalez

Cc: scott.gonzalez added

comment:2 Changed 6 years ago by timmywil

Component: unfileddimensions
Keywords: 1.8-discuss added
Status: newopen
Type: enhancementfeature
Version: git1.7.1

comment:3 Changed 6 years ago by dmethvin

#10994 is a duplicate of this ticket.

comment:4 Changed 6 years ago by jzaefferer

Description: modified (diff)

+1

comment:5 Changed 6 years ago by jaubourg

+0, Not sure here, what the cost in size?

comment:6 Changed 6 years ago by dmethvin

Description: modified (diff)

+1, Yes, but as with everything in 1.8 contingent on final size. This intersects with our box-sizing: border-box issues as well.

comment:7 Changed 6 years ago by mikesherov

Description: modified (diff)

+1, This is something people would expect jQuery to handle, and I'd love to work on this, so yes. Also, we can pretty much just rip the code straight from jquery ui. I do have some concerns though with code paths for hidden elements, but should be fun to implement.

comment:8 Changed 6 years ago by timmywil

-1

comment:9 Changed 6 years ago by Rick Waldron

Description: modified (diff)

+1

comment:10 Changed 5 years ago by mikesherov

Owner: set to mikesherov
Status: openassigned

comment:11 Changed 5 years ago by mikesherov

Keywords: 1.8-discuss removed
Milestone: None1.8
Priority: undecidedlow

comment:12 Changed 5 years ago by ALLPRO

+1 -- have wondered why this was not done a long time ago

comment:14 Changed 5 years ago by timmywil

I'm still a -1 on this feauture, especially given the added size to core.

comment:15 Changed 5 years ago by mikesherov

@timmywil, I hear the concern. There are strategies for smaller size that I outlined in the PR. Thoughts?

comment:16 Changed 5 years ago by Mike Sherov

Resolution: fixed
Status: assignedclosed

Fix #10877. Make outerWidth/Height a setter. Closes gh-783.

Changeset: e0151e5827d7091f311c82d9f951aaaa2688ba8c

comment:17 Changed 5 years ago by mikesherov

Keywords: needsdocs added

comment:18 Changed 5 years ago by mikesherov

Keywords: needsdocs removed

comment:20 Changed 3 years ago by jzaefferer

Note: See TracTickets for help on using tickets.