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
c67ac37d
authored
2016-07-07 18:29:01 -0400
by
Jeff Balicki
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
h
1 parent
57aa86b8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
7 deletions
public/files/js/interfaceGdrive.js
public/files/js/interfaceGdrive.js
View file @
c67ac37
//var pluginUrl = "http://contact-form.dev";
//var pdf_customizer = "http://pdf-customizer.dev/public";
//var pluginUrl = "http://localhost:8888/Forms";
//var pdf_customizer = "http://localhost:8888/pdf-customizer/public";
var
pluginUrl
=
"http://contact.gotenzing.com"
;
var
pdf_customizer
=
"http://pdf-customizer.synapsus.co"
;
...
...
@@ -41,6 +42,19 @@ function offFocus(id) {
});
}
CanvasRenderingContext2D
.
prototype
.
roundRect
=
function
(
x
,
y
,
w
,
h
,
r
)
{
if
(
w
<
2
*
r
)
r
=
w
/
2
;
if
(
h
<
2
*
r
)
r
=
h
/
2
;
this
.
beginPath
();
this
.
moveTo
(
x
+
r
,
y
);
this
.
arcTo
(
x
+
w
,
y
,
x
+
w
,
y
+
h
,
r
);
this
.
arcTo
(
x
+
w
,
y
+
h
,
x
,
y
+
h
,
r
);
this
.
arcTo
(
x
,
y
+
h
,
x
,
y
,
r
);
this
.
arcTo
(
x
,
y
,
x
+
w
,
y
,
r
);
this
.
closePath
();
return
this
;
}
function
ShowBox
(
pheight
,
pwidth
,
up
,
right
,
height
,
width
,
count
,
example
)
{
jQuery
(
document
).
ready
(
function
(
$
)
{
$
(
'span'
).
hide
();
...
...
@@ -52,6 +66,8 @@ function ShowBox(pheight, pwidth, up, right, height, width, count, example) {
Qctx
.
clearRect
(
0
,
0
,
Qc
.
width
,
Qc
.
height
);
Qctx
.
restore
();
var
down
=
pheight
-
(
up
+
height
);
var
scaleH
=
$
(
"Canvas"
).
height
()
/
pheight
;
var
scaleW
=
$
(
"Canvas"
).
width
()
/
pwidth
;
...
...
@@ -59,14 +75,20 @@ function ShowBox(pheight, pwidth, up, right, height, width, count, example) {
var
scaleRight
=
right
*
scaleW
;
var
scalewidth
=
width
*
scaleW
;
var
scaleheight
=
height
*
scaleH
;
var
radius
=
'50'
;
var
c
=
document
.
getElementById
(
"Canvas"
);
var
ctx
=
c
.
getContext
(
"2d"
);
ctx
.
save
();
ctx
.
rect
(
scaleRight
,
scaleDown
,
scalewidth
,
scaleheight
);
console
.
log
(
scaleRight
,
scaleDown
,
scalewidth
,
scaleheight
);
console
.
log
(
$
(
"Canvas"
).
height
(),
$
(
"Canvas"
).
width
(),
scaleW
,
scaleH
);
ctx
.
stroke
();
ctx
.
lineWidth
=
2
;
ctx
.
strokeStyle
=
"#F7A800"
;
ctx
.
roundRect
(
scaleRight
,
scaleDown
,
scalewidth
,
scaleheight
,
20
).
stroke
();
//ctx.rect(scaleRight, scaleDown, scalewidth, scaleheight );
//console.log(scaleRight, scaleDown, scalewidth, scaleheight);
//console.log($("Canvas").height(), $("Canvas").width(), scaleW, scaleH);
//
//ctx.lineWidth=2;
//ctx.lineCap = "round";
//ctx.stroke();
//console.log(pheight, pwidth,up, right, height, width);
// console.log(myrect )
});
...
...
@@ -200,6 +222,7 @@ function changePdfOptions(json) {
}
if
(
json
[
i
].
change_type
==
"date"
)
{
pdfChange
+=
json
[
i
].
names
+
': <input onfocusout="HideBoxwithdate()" onfocus="ShowBox('
+
json
[
0
].
pheight
+
','
+
json
[
0
].
pwidth
+
','
+
json
[
i
].
locationUp
+
','
+
json
[
i
].
locationRight
+
','
+
json
[
i
].
height
+
','
+
json
[
i
].
width
+
','
+
i
+
',\''
+
example
+
'\')" id="changescontentdate" type="text" class="required date" name="content['
+
i
+
']" value="'
+
json
[
i
].
content
+
'"">'
;
pdfChange
+=
'<span id="span'
+
i
+
'"> </span><br/>'
;
}
...
...
Please
register
or
sign in
to post a comment