Merge branch 'release-1.34'

This commit is contained in:
Isaac Connor 2020-08-23 11:51:54 -04:00
commit 2a7ea52330
2 changed files with 10 additions and 14 deletions

View File

@ -80,7 +80,7 @@ fi;
if [ "$DISTROS" == "" ]; then if [ "$DISTROS" == "" ]; then
if [ "$RELEASE" != "" ]; then if [ "$RELEASE" != "" ]; then
DISTROS="xenial,bionic,eoan,focal" DISTROS="xenial,bionic,focal"
else else
DISTROS=`lsb_release -a 2>/dev/null | grep Codename | awk '{print $2}'`; DISTROS=`lsb_release -a 2>/dev/null | grep Codename | awk '{print $2}'`;
fi; fi;

View File

@ -178,7 +178,8 @@ function applyPreset() {
function toPixels(field, maxValue) { function toPixels(field, maxValue) {
if ( field.value != '' ) { if ( field.value != '' ) {
field.value = Math.round((field.value*maxValue)/100); field.value = Math.round((field.value*maxValue)/100);
if ( field.value > maxValue ) field.value = maxValue; if ( field.value > maxValue )
field.value = maxValue;
} }
field.setAttribute('step', 1); field.setAttribute('step', 1);
field.setAttribute('max', maxValue); field.setAttribute('max', maxValue);
@ -249,14 +250,12 @@ function limitArea(field) {
limitRange(field, minValue, maxValue); limitRange(field, minValue, maxValue);
} }
function highlightOn(point) { function highlightOn(index) {
var index = point.getAttribute('data-index');
$('row'+index).addClass('highlight'); $('row'+index).addClass('highlight');
$('point'+index).addClass('highlight'); $('point'+index).addClass('highlight');
} }
function highlightOff(point) { function highlightOff(index) {
var index = point.getAttribute('data-index');
$('row'+index).removeClass('highlight'); $('row'+index).removeClass('highlight');
$('point'+index).removeClass('highlight'); $('point'+index).removeClass('highlight');
} }
@ -328,17 +327,15 @@ function addPoint(index) {
if ( index >= (zone['Points'].length-1) ) { if ( index >= (zone['Points'].length-1) ) {
nextIndex = 0; nextIndex = 0;
} }
var newX = parseInt(Math.round((zone['Points'][index]['x']+zone['Points'][nextIndex]['x'])/2)); var newX = parseInt(Math.round((zone['Points'][index]['x']+zone['Points'][nextIndex]['x'])/2));
var newY = parseInt(Math.round((zone['Points'][index]['y']+zone['Points'][nextIndex]['y'])/2)); var newY = parseInt(Math.round((zone['Points'][index]['y']+zone['Points'][nextIndex]['y'])/2));
if ( nextIndex == 0 ) { if ( nextIndex == 0 ) {
zone['Points'][zone['Points'].length] = {'x': newX, 'y': newY}; zone['Points'][zone['Points'].length] = {'x': newX, 'y': newY};
} else { } else {
zone['Points'].splice( nextIndex, 0, {'x': newX, 'y': newY} ); zone['Points'].splice(nextIndex, 0, {'x': newX, 'y': newY});
} }
drawZonePoints(); drawZonePoints();
// drawZonePoints calls updateZoneImage
//updateZoneImage();
//setActivePoint( nextIndex );
} }
function delPoint(index) { function delPoint(index) {
@ -421,10 +418,9 @@ function drawZonePoints() {
'top': zone['Points'][i].y 'top': zone['Points'][i].y
} }
}); });
//div.addEvent('mouseover', highlightOn.pass(i)); div.addEvent('mouseover', highlightOn.pass(i));
div.onmouseover = window['highlightOn'].bind(div, div);
div.onmouseout = window['highlightOff'].bind(div, div);
div.addEvent('mouseout', highlightOff.pass(i)); div.addEvent('mouseout', highlightOff.pass(i));
div.inject($('imageFrame')); div.inject($('imageFrame'));
div.makeDraggable( { div.makeDraggable( {
'container': $('imageFrame'), 'container': $('imageFrame'),
@ -493,7 +489,7 @@ function drawZonePoints() {
cell.inject(row); cell.inject(row);
row.inject(tables[i%tables.length].getElement('tbody')); row.inject(tables[i%tables.length].getElement('tbody'));
} } // end foreach point
// Sets up the SVG polygon // Sets up the SVG polygon
updateZoneImage(); updateZoneImage();
} }