Skip to content

Commit

Permalink
Merge pull request #553 from Alex-Jordan/graphtoolPTX
Browse files Browse the repository at this point in the history
account for PTX output from GraphTool
  • Loading branch information
drgrice1 authored Mar 23, 2021
2 parents 2112b44 + 64a0603 commit 88e9bfa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions macros/parserGraphTool.pl
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ =head1 OPTIONS
=cut

sub _parserGraphTool_init {
if ($main::displayMode ne 'TeX' && !$main::GraphToolHeaderSet) {
if ($main::displayMode ne 'TeX' && $main::displayMode ne 'PTX' && !$main::GraphToolHeaderSet) {
main::TEXT(
'<link rel="stylesheet" type="text/css" href="/webwork2_files/js/vendor/jsxgraph/jsxgraph.css">' .
'<link rel="stylesheet" type="text/css" href="/webwork2_files/js/apps/GraphTool/graphtool.css">' .
Expand Down Expand Up @@ -493,7 +493,7 @@ sub ans_rule {

$out = main::image(main::insertGraph($graph),
width => $size[0], height => $size[1], tex_size => $self->{texSize});
} else {
} elsif ($main::displayMode ne 'PTX') {
$self->constructJSXGraphOptions;
my $ans_name = $self->ANS_NAME;
$out .= "<div id='${ans_name}_graphbox' class='graphtool-container'></div>" .
Expand Down Expand Up @@ -549,7 +549,7 @@ sub cmp {
my $self = shift;
my $cmp = $self->SUPER::cmp(non_tex_preview => 1, %{$self->{cmpOptions}}, @_);

if ($main::displayMode ne 'TeX') {
if ($main::displayMode ne 'TeX' && $main::displayMode ne 'PTX') {
my $ans_name = $self->ANS_NAME;
$self->constructJSXGraphOptions;
my $graphObjs = @{$self->{staticObjects}} ?
Expand Down

0 comments on commit 88e9bfa

Please sign in to comment.