Ticket #5964 (closed enhancement: fixed)

Opened 4 years ago

Last modified 4 years ago

Combine horizontalDefault and verticalDefault to one variable - possibly named center

Reported by: awirick Owned by:
Priority: minor Milestone: 1.8.5
Component: ui.position Version: 1.8.4
Keywords: center, horizontalDefault, verticalDefault Cc:
Blocking: Blocked by:

Description

Variables 'horizontalDefault' and 'verticalDefault' are both set initially to the string "center" and never modified. Consider combining these into a single variable.

old:

var horizontalPositions = /left|center|right/,
	horizontalDefault = "center",
	verticalPositions = /top|center|bottom/,
	verticalDefault = "center",
	_position = $.fn.position,
	_offset = $.fn.offset;

new:

var horizontalPositions = /left|center|right/,
	verticalPositions = /top|center|bottom/,
	center = "center",
	_position = $.fn.position,
	_offset = $.fn.offset;

Change History

comment:1 Changed 4 years ago by scott.gonzalez

  • Status changed from new to closed
  • Resolution set to fixed
  • Milestone changed from TBD to 1.9

Fixed in  2acfde9.

comment:2 Changed 4 years ago by scott.gonzalez

  • Milestone changed from 1.9 to 1.8.5

comment:3 Changed 4 years ago by Scott González

Position: Created center variable for better minification. Fixes #5964 - Combine horizontalDefault and verticalDefault to one variable - possibly named center.

Changeset: 2acfde9e5e411ece98bf7877212f0100d1c8c489

Note: See TracTickets for help on using tickets.