Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- artEditor.prototype.fxSetFinalSize = function(size) {
- var w1 = this.canvas.width,
- h1 = this.canvas.height,
- w2 = size.split('x')[this.editor.setViewPosition],
- h2 = size.split('x')[1 - this.editor.setViewPosition],
- a1 = h2 / w2 * w1,
- a2 = w2 / h2 * h1,
- os = 25;
- if((w2 / h2) > (w1 / h1)) {
- this.setFinalView[0] = os;
- this.setFinalView[1] = (h1 * 0.5) - (a1 / 2) + (os * (h2 / w2));
- } else {
- this.setFinalView[0] = (w1 * 0.5) - (a2 / 2) + (os * (w2 / h2));
- this.setFinalView[1] = os;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement