Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Tenzing
/
pdf-customizer
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
78d5bd03
authored
2016-07-21 11:26:35 -0400
by
Jeff Balicki
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
3
1 parent
eebb4620
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
12 deletions
public/files/js/interfaceGdrive.js
public/files/js/interfaceGdrive.js
View file @
78d5bd0
...
...
@@ -233,24 +233,26 @@ function changePdfOptions(json, edit) {
var
windowHeight
=
0.86
*
$
(
window
).
height
();
var
windowHBG
=
0.923
*
$
(
window
).
height
();
var
pwidth
=
parseInt
(
json
[
0
].
pwidth
);
var
pheight
=
parseInt
(
json
[
0
].
pheight
);
if
(
json
[
0
].
pwidth
>
json
[
0
].
pheight
){
console
.
log
(
'wide'
)
var
scaleImage
=
windowWidth
/
json
[
0
].
pwidth
;
var
imageHeight
=
json
[
0
].
pheight
*
scaleImage
;
if
(
pwidth
>
pheight
){
//
console.log('wide')
var
scaleImage
=
windowWidth
/
pwidth
;
var
imageHeight
=
pheight
*
scaleImage
;
var
imageWidth
=
windowWidth
;
var
imgLeft
=
0
;
var
imgTop
=
25
;
}
else
{
var
scaleImage
=
windowHeight
/
json
[
0
].
pheight
;
var
scaleImage
=
windowHeight
/
pheight
;
var
imageHeight
=
windowHeight
;
var
imageWidth
=
json
[
0
].
pwidth
*
scaleImage
;
var
imageWidth
=
pwidth
*
scaleImage
;
var
imgLeft
=
30
;
var
imgTop
=
2
;
}
console
.
log
(
'windowWidth'
+
windowWidth
,
'windowHeight'
+
windowHeight
,
'pheight'
+
json
[
0
].
pheight
,
'pwidth'
+
json
[
0
].
pwidth
,
'imageWidth'
+
imageWidth
,
'imageHeight'
+
imageHeight
);
//
console.log('windowWidth'+windowWidth ,'windowHeight'+windowHeight,'pheight'+json[0].pheight,'pwidth'+json[0].pwidth,'imageWidth'+imageWidth, 'imageHeight'+imageHeight);
pdflist
+=
'<div id="pdfPreview" style="" class="column">'
;
// pdflist += '<img id="pdfimage" src="' + pdf_customizer + '/fileentry/getImage/' + json[0].folder + '/' + json[0].example + '" width="300px">';
...
...
@@ -502,17 +504,20 @@ function returnOptions(form) {
var
windowHeight
=
0.86
*
$
(
window
).
height
();
var
windowHBG
=
0.923
*
$
(
window
).
height
();
var
pwidth
=
parseInt
(
json
[
0
].
pwidth
);
var
pheight
=
parseInt
(
json
[
0
].
pheight
);
if
(
json
[
0
].
pwidth
>
json
[
0
].
pheight
){
var
scaleImage
=
windowWidth
/
json
[
0
].
pwidth
;
var
imageHeight
=
json
[
0
].
pheight
*
scaleImage
;
if
(
pwidth
>
pheight
){
var
scaleImage
=
windowWidth
/
pwidth
;
var
imageHeight
=
pheight
*
scaleImage
;
var
imageWidth
=
windowWidth
;
var
imgLeft
=
0
;
var
imgTop
=
25
;
}
else
{
var
scaleImage
=
windowHeight
/
json
[
0
].
pheight
;
var
scaleImage
=
windowHeight
/
pheight
;
var
imageHeight
=
windowHeight
;
var
imageWidth
=
json
[
0
].
pwidth
*
scaleImage
;
var
imageWidth
=
pwidth
*
scaleImage
;
var
imgLeft
=
30
;
var
imgTop
=
2
;
}
...
...
Please
register
or
sign in
to post a comment