Skip to content

Commit c7f9617

Browse files
bwl21Uzlopak
authored andcommitted
fix #2137 and example for linedash #1331 (#2166)
1 parent 4fa4130 commit c7f9617

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed

examples/js/lines.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,18 @@ doc.setLineWidth(1);
2323
doc.line(110, 20, 110, 60);
2424

2525
doc.setLineWidth(1.5);
26-
doc.line(115, 20, 115, 60);
26+
doc.line(115, 20, 115, 60);
27+
28+
doc.text(10,110, "setLineDash");
29+
30+
doc.setLineWidth(0.1)
31+
doc.setDrawColor(0,0,0);
32+
33+
doc.setLineDash([2.5])
34+
doc.line(10,120,200,120)
35+
36+
doc.setLineDash([1, 1.5, 1, 1.5, 1, 1.5, 3, 2, 3, 2, 3, 2 ])
37+
doc.line(10,125,200,125)
38+
39+
doc.setLineDash([1, 1.5, 1, 1.5, 1, 1.5, 3, 2, 3, 2, 3, 2 ], 7.5)
40+
doc.line(10,130,200,130)

index.html

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
<br/><span class="muted" id="dversion"></span>
2929
</span>
3030
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
31-
<p class="muted" style="text-align: right;">Version 0.9.0rc2</p-->
3231

3332
</div>
3433
<h1 class="muted">jsPDF</h1>
@@ -84,6 +83,14 @@ <h2>Have a play.</h2>
8483
<!-- Scripts down here -->
8584
<script src="https://code.jquery.com/jquery-3.1.1.min.js" integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8=" crossorigin="anonymous"></script>
8685

86+
<script type="text/javascript">
87+
$(document).ready(function() {
88+
if(jsPDF && jsPDF.version) {
89+
$('#dversion').text('Version ' + jsPDF.version);
90+
}
91+
});
92+
</script>
93+
8794
<!-- Code editor -->
8895

8996
<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.5/ace.js" type="text/javascript" charset="utf-8"></script>

0 commit comments

Comments
 (0)