version 1.96, 2012/08/16 21:02:29
|
version 1.97, 2012/08/16 23:03:01
|
Line 49 BEGIN {
|
Line 49 BEGIN {
|
# Return a true value if HTML5 should be used. |
# Return a true value if HTML5 should be used. |
|
|
sub useHTML5 { |
sub useHTML5 { |
return 0; |
return 1; |
} |
} |
|
|
# Routines to start the applet (Java) or the HTML5/JavaScript |
# Routines to start the applet (Java) or the HTML5/JavaScript |
Line 69 sub geogebra_startcode {
|
Line 69 sub geogebra_startcode {
|
} |
} |
|
|
sub geogebra_endcode { |
sub geogebra_endcode { |
unless (&useHTML5()) { |
if (&useHTML5()) { |
|
return ''; |
|
} else { |
return &java_geogebra_endcode(); |
return &java_geogebra_endcode(); |
} |
} |
} |
} |
|
|
sub geogebra_default_parameters { |
sub geogebra_default_parameters { |
my ($id)=@_; |
my ($id)=@_; |
unless (&useHTML5()) { |
if (&useHTML5()) { |
|
return ''; |
|
} else { |
return &java_geogebra_default_parameters($id); |
return &java_geogebra_default_parameters($id); |
} |
} |
} |
} |
Line 107 sub java_geogebra_code_param {
|
Line 111 sub java_geogebra_code_param {
|
|
|
sub html5_geogebra_startcode { |
sub html5_geogebra_startcode { |
my ($id,$width,$height)=@_; |
my ($id,$width,$height)=@_; |
|
$width=int(1.*$width); |
|
$height=int(1.*$height); |
|
unless ($width) { $width=700; } |
|
unless ($height) { $height=400; } |
my $code=&geogebra_internal_program(); |
my $code=&geogebra_internal_program(); |
return (<<ENDSTARTCODE); |
return (<<ENDSTARTCODE); |
<article class="geogebraweb" data-param-enableLabelDrags="false" data-param-enableShiftDragZoom="false" |
<article class="geogebraweb" data-param-enableLabelDrags="false" data-param-enableShiftDragZoom="false" |
Line 174 sub init_script {
|
Line 182 sub init_script {
|
'<script type="text/javascript" language="javascript" src="/adm/geogebra/html5/web/test42/web/web.nocache.js"></script>'; |
'<script type="text/javascript" language="javascript" src="/adm/geogebra/html5/web/test42/web/web.nocache.js"></script>'; |
} |
} |
return (<<ENDGGBINIT); |
return (<<ENDGGBINIT); |
|
$html5init |
<script type="text/javascript"> |
<script type="text/javascript"> |
// <![CDATA[ |
// <![CDATA[ |
// Function that each applet will call when loaded |
// Function that each applet will call when loaded |