From 0ea8ec2932218b99baffb6b9d767c74cd4753661 Mon Sep 17 00:00:00 2001 From: Knox Date: Tue, 29 May 2018 17:20:07 +0800 Subject: [PATCH] fixed webview and video-player display err for fireball/issues/7410 (#2756) --- cocos2d/videoplayer/video-player-impl.js | 4 ++-- cocos2d/webview/webview-impl.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cocos2d/videoplayer/video-player-impl.js b/cocos2d/videoplayer/video-player-impl.js index 92e26c3389..d5b8b9fabb 100644 --- a/cocos2d/videoplayer/video-player-impl.js +++ b/cocos2d/videoplayer/video-player-impl.js @@ -416,8 +416,8 @@ let VideoPlayerImpl = cc.Class({ h = this._h * scaleY; } - let appx = (w * a) * node._anchorPoint.x; - let appy = (h * d) * node._anchorPoint.y; + let appx = (w * _mat4_temp.m00) * node._anchorPoint.x; + let appy = (h * _mat4_temp.m05) * node._anchorPoint.y; let tx = _mat4_temp.m12 * scaleX - appx + offsetX, ty = _mat4_temp.m13 * scaleY - appy + offsetY; let matrix = "matrix(" + a + "," + -b + "," + -c + "," + d + "," + tx + "," + -ty + ")"; diff --git a/cocos2d/webview/webview-impl.js b/cocos2d/webview/webview-impl.js index bfe172cffd..44235523ef 100644 --- a/cocos2d/webview/webview-impl.js +++ b/cocos2d/webview/webview-impl.js @@ -355,8 +355,8 @@ let WebViewImpl = cc.Class({ this._updateSize(this._w, this._h); let w = this._div.clientWidth * scaleX; let h = this._div.clientHeight * scaleY; - let appx = (w * a) * node._anchorPoint.x; - let appy = (h * d) * node._anchorPoint.y; + let appx = (w * _mat4_temp.m00) * node._anchorPoint.x; + let appy = (h * _mat4_temp.m05) * node._anchorPoint.y; let tx = _mat4_temp.m12 * scaleX - appx + offsetX, ty = _mat4_temp.m13 * scaleY - appy + offsetY; let matrix = "matrix(" + a + "," + -b + "," + -c + "," + d + "," + tx + "," + -ty + ")";