forked from 0x2620/oxjs
exclusively handle selectability of text via .OxSelectable and body.OxDragging (to be set/unset in dragstart/dragend handlers)
This commit is contained in:
parent
f8816e7522
commit
564ce69a78
17 changed files with 53 additions and 39 deletions
|
|
@ -234,6 +234,7 @@ Ox.Dialog = function(options, self) {
|
|||
function dragstart(event) {
|
||||
var offset;
|
||||
if (!$(event.target).is('.OxButton')) {
|
||||
Ox.$body.addClass('OxDragging');
|
||||
offset = that.offset();
|
||||
self.drag = {
|
||||
left: offset.left,
|
||||
|
|
@ -262,8 +263,11 @@ Ox.Dialog = function(options, self) {
|
|||
}
|
||||
}
|
||||
|
||||
function dragend() {
|
||||
that.unwrap();
|
||||
function dragend(event) {
|
||||
if (!$(event.target).is('.OxButton')) {
|
||||
Ox.$body.removeClass('OxDragging');
|
||||
that.unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
function getButtonById(id) {
|
||||
|
|
@ -329,6 +333,7 @@ Ox.Dialog = function(options, self) {
|
|||
}
|
||||
|
||||
function resizestart(event) {
|
||||
Ox.$body.addClass('OxDragging');
|
||||
var edge = event.target.className.slice(17).toLowerCase(),
|
||||
offset = that.offset();
|
||||
self.drag = {
|
||||
|
|
@ -506,6 +511,7 @@ Ox.Dialog = function(options, self) {
|
|||
}
|
||||
|
||||
function resizeend() {
|
||||
Ox.$body.removeClass('OxDragging');
|
||||
that.unwrap();
|
||||
that.triggerEvent('resizeend', {
|
||||
width: self.options.width,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue