Skip to content

Commit

Permalink
bugfix #30
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaoda committed Oct 13, 2015
1 parent 812ba39 commit 15db277
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 5 deletions.
10 changes: 9 additions & 1 deletion dist/spa-apis.js
Original file line number Diff line number Diff line change
Expand Up @@ -1752,6 +1752,9 @@

}

// 设置关闭状态为false,已经打开面板
$panel.data('closing', false)

panelData.prevPage = $curPage
panelOptions.afteropen.call($panel, panelData)
$curPage = $panel
Expand Down Expand Up @@ -1798,6 +1801,12 @@

options && options.id && ($panel = $('.spa-panel-' + options.id))

// 判断面板是否在关闭过程中
if($panel.data('closing')) {
return
}
$panel.data('closing', true)

// 关闭面板后打开之前的页面
if($curPage.hasClass('spa-panel') && $curPage.data('id') === panelId) {
var $page = panelData.prevPage
Expand Down Expand Up @@ -2052,7 +2061,6 @@
clearTimeout(id)
}
})()

;(function (argument) {
'use strict'

Expand Down
2 changes: 1 addition & 1 deletion dist/spa-apis.min.js

Large diffs are not rendered by default.

11 changes: 10 additions & 1 deletion dist/spa.js
Original file line number Diff line number Diff line change
Expand Up @@ -1752,6 +1752,9 @@

}

// 设置关闭状态为false,已经打开面板
$panel.data('closing', false)

panelData.prevPage = $curPage
panelOptions.afteropen.call($panel, panelData)
$curPage = $panel
Expand Down Expand Up @@ -1798,6 +1801,12 @@

options && options.id && ($panel = $('.spa-panel-' + options.id))

// 判断面板是否在关闭过程中
if($panel.data('closing')) {
return
}
$panel.data('closing', true)

// 关闭面板后打开之前的页面
if($curPage.hasClass('spa-panel') && $curPage.data('id') === panelId) {
var $page = panelData.prevPage
Expand Down Expand Up @@ -2051,4 +2060,4 @@
window.cancelAnimationFrame = function(id) {
clearTimeout(id)
}
})()
})()
2 changes: 1 addition & 1 deletion dist/spa.min.js

Large diffs are not rendered by default.

11 changes: 10 additions & 1 deletion src/spa.js
Original file line number Diff line number Diff line change
Expand Up @@ -1745,6 +1745,9 @@

}

// 设置关闭状态为false,已经打开面板
$panel.data('closing', false)

panelData.prevPage = $curPage
panelOptions.afteropen.call($panel, panelData)
$curPage = $panel
Expand Down Expand Up @@ -1791,6 +1794,12 @@

options && options.id && ($panel = $('.spa-panel-' + options.id))

// 判断面板是否在关闭过程中
if($panel.data('closing')) {
return
}
$panel.data('closing', true)

// 关闭面板后打开之前的页面
if($curPage.hasClass('spa-panel') && $curPage.data('id') === panelId) {
var $page = panelData.prevPage
Expand Down Expand Up @@ -2044,4 +2053,4 @@
window.cancelAnimationFrame = function(id) {
clearTimeout(id)
}
})()
})()

0 comments on commit 15db277

Please sign in to comment.