my $collation = $tradition->collation;
# Stash text direction to use in JS.
- $c->stash->{'direction'} = $collation->direction;
+ $c->stash->{'direction'} = $collation->direction || 'BI';
# Stash the relationship definitions
$c->stash->{'relationship_scopes'} =
$m->save($collation);
- if ($collation->direction eq 'RL') {
- @nodes = reverse @nodes;
- }
-
$c->stash->{'result'} = {
success => 1,
nodes => \@nodes,
var start_element_height = 0;
var reltypes = {};
var readingdata = {};
-var text_direction = 'LR';
jQuery.removeFromArray = function(value, arr) {
return jQuery.grep(arr, function(elem, index) {
});
}
-function loadSVG(svgData, direction) {
- text_direction = direction;
-
+function loadSVG(svgData) {
var svgElement = $('#svgenlargement');
$(svgElement).svg('destroy');
var textid = "[% textid %]";
var can_morphologize = "[% can_morphologize %]";
var editable = "[% permission %]" === "full";
+var text_direction = "[% direction %]";
// URLs for images referenced in Javascript
var merge_button_yes = "[% c.uri_for( '/images/tick_circle_frame.png' ) %]";
var merge_button_no = "[% c.uri_for( '/images/no_entry.png' ) %]";
[% END -%]
$(document).ready(function () {
- loadSVG('[% svg_string %]', '[% direction %]');
+ loadSVG('[% svg_string %]');
});
</script>
[% END %]