mirror of
https://shylinux.com/x/volcanos
synced 2025-04-26 01:04:06 +08:00
opt some
This commit is contained in:
parent
b2d33d1991
commit
e9fa139546
5
frame.js
5
frame.js
@ -677,7 +677,12 @@ Volcanos("onmotion", {help: "动态特效", list: [], _init: function(can, targe
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
move: function(can, target, layout) { var begin
|
move: function(can, target, layout) { var begin
|
||||||
|
|
||||||
target.onmousedown = function(event) {
|
target.onmousedown = function(event) {
|
||||||
|
layout.width = target.offsetWidth
|
||||||
|
layout.height = target.offsetHeight
|
||||||
|
layout.left = target.offsetLeft
|
||||||
|
layout.top = target.offsetTop
|
||||||
begin = {x: event.x, y: event.y, left: layout.left, top: layout.top, width: layout.width, height: layout.height}
|
begin = {x: event.x, y: event.y, left: layout.left, top: layout.top, width: layout.width, height: layout.height}
|
||||||
}, target.onmouseup = function(event) { begin = null }
|
}, target.onmouseup = function(event) { begin = null }
|
||||||
|
|
||||||
|
@ -156,7 +156,9 @@ Volcanos("ondetail", {help: "用户交互", list: [],
|
|||||||
sub.Conf("height", height+120)
|
sub.Conf("height", height+120)
|
||||||
}
|
}
|
||||||
|
|
||||||
can.page.Modify(can, sub._target, {style: {position: "fixed", left: left+margin, top: top}})
|
var layout = {position: "fixed", left: left+margin, top: top}
|
||||||
|
can.onmotion.move(can, sub._target, layout)
|
||||||
|
can.page.Modify(can, sub._target, {style: layout})
|
||||||
can.page.Modify(can, sub._output, {style: {"max-width": width-margin*2}})
|
can.page.Modify(can, sub._output, {style: {"max-width": width-margin*2}})
|
||||||
can.base.isFunc(cb) && cb(msg)
|
can.base.isFunc(cb) && cb(msg)
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user