4,092
edits
No edit summary |
No edit summary |
||
Line 426: | Line 426: | ||
const showArticle = document.querySelector('#show-article'); | const showArticle = document.querySelector('#show-article'); | ||
const h = showArticle.clientHeight; | const h = showArticle.clientHeight; | ||
const theta = -Math.atan(offset/h); | |||
const b = -Math.sin( | const a = Math.cos(theta); | ||
const c = Math.sin( | const b = -Math.sin(theta); | ||
const d = Math.cos( | const c = Math.sin(theta); | ||
const d = Math.cos(theta); | |||
const showArticleBefore = document.querySelector('#show-article-before'); | const showArticleBefore = document.querySelector('#show-article-before'); | ||
const transformValue = 'matrix('+a+','+b+','+c+','+d+',0,0)'; | const transformValue = 'matrix('+a+','+b+','+c+','+d+',0,0)'; |