add minimum value 0 for region editor polygon points
parent
47b48c3f10
commit
57b312711d
|
@ -210,7 +210,14 @@ module.exports = function(s,config){
|
||||||
if(!region)return false;
|
if(!region)return false;
|
||||||
region.polygon = [];
|
region.polygon = [];
|
||||||
region.points.forEach(function(points){
|
region.points.forEach(function(points){
|
||||||
region.polygon.push({x:parseFloat(points[0]),y:parseFloat(points[1])})
|
var x = parseFloat(points[0]);
|
||||||
|
var y = parseFloat(points[1]);
|
||||||
|
if(x < 0)x = 0;
|
||||||
|
if(y < 0)y = 0;
|
||||||
|
region.polygon.push({
|
||||||
|
x: x,
|
||||||
|
y: y
|
||||||
|
})
|
||||||
})
|
})
|
||||||
if(region.sensitivity===''){
|
if(region.sensitivity===''){
|
||||||
region.sensitivity = globalSensitivity
|
region.sensitivity = globalSensitivity
|
||||||
|
|
Loading…
Reference in New Issue