Skip to content

Commit

Permalink
- changed position of top/left in position option
Browse files Browse the repository at this point in the history
- updated comments and changelog
  • Loading branch information
ericmmartin committed Dec 4, 2008
1 parent 40ccb66 commit 9177115
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
9 changes: 4 additions & 5 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,16 @@
* Added new options (iframe, dataCss, zIndex, closeHTML and position)
* Renamed overlay option to opacity
* Removed closeTitle option
* Renamed default class and id names (from modalXxx to simplemodal-xxx)
* Renamed default class and id names from modalXxx to simplemodal-xxx
* Added better z-index handling
* Fixed element creation to be XHTML compliant
* Added window dimension detection
* Added iframe to every modal dialog (to prevent object bleed-through)
(can be disabled by the {iframe:false} option
* Added iframe to every modal dialog to prevent object bleed-through (can be disabled by the {iframe:false} option)
* Fixed Safari issue (directly setting display:'none' as opposed to using .hide())
* Changed width/height setting for overlay and iframe
* Fixed IE7 quirks mode positioning issue
* Fixed IE7 positioning issue in quirks mode
* Added IE6 expression for elements - eliminating the need for an external stylesheet
* Added dynamic centering of container as well as a position option
* Added dynamic centering of container as well as a position option for manual positioning
* Added namespacing on events
* Added window resize listener to resize dialog elements

Expand Down
8 changes: 4 additions & 4 deletions src/jquery.simplemodal.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@
* zIndex: (Number: 1000) Starting z-index value
* close: (Boolean:true) Show closeHTML?
* closeHTML: (String:'<a class="modalCloseImg" title="Close"></a>') The HTML for the
default close link. Depends on close.
default close link. SimpleModal will automatically add the closeClass to this element.
* closeClass: (String:'simplemodal-close') The CSS class used to bind to the close event
* position: (Array:null) Position of container [left, top]. can be number of pixels or percentage
* position: (Array:null) Position of container [top, left]. Can be number of pixels or percentage
* persist: (Boolean:false) Persist the data across modal calls? Only used for existing
DOM elements. If true, the data will be maintained across modal calls, if false,
the data will be reverted to its original state.
Expand Down Expand Up @@ -342,8 +342,8 @@
vCenter = (w[1]/2) - (this.dialog.container.width()/2);

if (this.opts.position && this.opts.position.constructor == Array) {
top += this.opts.position[1] || hCenter;
left += this.opts.position[0] || vCenter;
top += this.opts.position[0] || hCenter;
left += this.opts.position[1] || vCenter;
} else {
top += hCenter;
left += vCenter;
Expand Down

0 comments on commit 9177115

Please sign in to comment.