File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change 319319 } , this . _options . delay ) ;
320320 } ;
321321
322- BoxModal . prototype . close = function ( result ) {
322+ BoxModal . prototype . _destroy = function ( result ) {
323323 this . _remove ( ) ;
324324 this . $watch && this . $watch ( ) ;
325325 this . _scope && this . _scope . $destroy ( ) ;
326326 this . _scope = null ;
327327 $document . unbind ( "mousedown.pbox" + this . _id ) ;
328328 $document . unbind ( "keydown.pbox" + this . _id ) ;
329- _resultDeferred . resolve ( result ) ;
329+ } ;
330+
331+ BoxModal . prototype . close = function ( result ) {
332+ this . _destroy ( ) ;
333+ this . resultDeferred . resolve ( result ) ;
330334 } ;
331335
332336 BoxModal . prototype . dismiss = function ( reason ) {
333- this . _remove ( ) ;
334- this . $watch && this . $watch ( ) ;
335- this . _scope && this . _scope . $destroy ( ) ;
336- this . _scope = null ;
337- $document . unbind ( "mousedown.pbox" + this . _id ) ;
338- $document . unbind ( "keydown.pbox" + this . _id ) ;
339- _resultDeferred . reject ( reason ) ;
337+ this . _destroy ( ) ;
338+ this . resultDeferred . reject ( reason ) ;
340339 }
341340 }
342341
You can’t perform that action at this time.
0 commit comments