mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-20 04:01:20 -08:00
添加绝对坐标
This commit is contained in:
1 parent
c95d379064
commit
0335c678d5
3 files changed
+25
-3
No files matched your search
@@ -3240,13 +3240,23 @@
|
||||
return art.template.$player.getBoundingClientRect();
|
||||
}
|
||||
});
|
||||
['bottom', 'height', 'left', 'right', 'top', 'width', 'x', 'y'].forEach(function (key) {
|
||||
['bottom', 'height', 'left', 'right', 'top', 'width'].forEach(function (key) {
|
||||
Object.defineProperty(player, key, {
|
||||
get: function get() {
|
||||
return player.rect[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
Object.defineProperty(player, 'x', {
|
||||
get: function get() {
|
||||
return player.left + window.pageXOffset;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(player, 'y', {
|
||||
get: function get() {
|
||||
return player.top + window.pageYOffset;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function flipMix(art, player) {
|
||||
|
||||
Reference in new issue
Block a user