mirror of
https://github.com/cds-astro/aladin-lite.git
synced 2025-12-12 07:40:26 -08:00
remove rust warning, fix rust compilation
This commit is contained in:
committed by
Matthieu Baumann
parent
b4f905e745
commit
3c23b6dbe9
@@ -4,6 +4,7 @@
|
||||
|
||||
* [feat] Add support for name removing in `removeOverlay` method
|
||||
* [test] Add support of playwright. Instructions in the readme for running the test matching snapshots [PR #176]
|
||||
* [fixed] Order of overlays in the stack now matches the addMOC/addCatalog/addOverlay calls ordering
|
||||
|
||||
## 3.5.0-beta
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
import A from '../src/js/A.js';
|
||||
let aladin;
|
||||
A.init.then(() => {
|
||||
aladin = A.aladin('#aladin-lite-div', {survey: "data/hips/PanSTARRS_DR1_color-z-zg-g", fov:2.0, target: "NGC 7318B", showSettingsControl: true, log: false});
|
||||
aladin = A.aladin('#aladin-lite-div', {survey: "data/hips/PanSTARRS_DR1_color-z-zg-g", fov:2.0, target: "22 35 58.39 +33 57 57.8", showSettingsControl: true, log: false});
|
||||
aladin.setProjection('AIT');
|
||||
let cfht = aladin.createImageSurvey("CFHT", "CFHT MegaCam u+g+r", "./data/hips/CFHT", "equatorial", 10, {imgFormat: 'png'});
|
||||
let jwst1 = aladin.createImageSurvey("CDS/P/JWST/Stephans-Quintet/NIRCam+MIRI", "JWST NIRCam+MIRI", "data/hips/JWST_NIRCam_MIRI", null, null, {imgFormat: 'png'});
|
||||
|
||||
@@ -5,7 +5,7 @@ use serde::Deserialize;
|
||||
pub struct Resources(HashMap<String, String>);
|
||||
|
||||
impl Resources {
|
||||
pub fn get_filename<'a>(&'a self, name: &str) -> Option<&String> {
|
||||
pub fn get_filename(&self, name: &str) -> Option<&String> {
|
||||
self.0.get(name)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,8 +17,6 @@ use crate::{
|
||||
tile_fetcher::TileFetcherQueue,
|
||||
time::DeltaTime,
|
||||
};
|
||||
use al_core::log::console_log;
|
||||
use std::sync::{Arc, Mutex};
|
||||
use wcs::WCS;
|
||||
|
||||
use wasm_bindgen::prelude::*;
|
||||
|
||||
@@ -85,7 +85,7 @@ use wasm_bindgen::JsCast;
|
||||
|
||||
const MAX_DPI_LIMIT: f32 = 3.0;
|
||||
use crate::math;
|
||||
use crate::time::{DeltaTime, Time};
|
||||
use crate::time::Time;
|
||||
use crate::Abort;
|
||||
use crate::ArcDeg;
|
||||
impl CameraViewPort {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
pub mod query;
|
||||
pub mod request;
|
||||
|
||||
|
||||
use std::collections::HashSet;
|
||||
|
||||
use query::QueryId;
|
||||
@@ -98,13 +97,7 @@ impl Downloader {
|
||||
self.queried_list.contains(id)
|
||||
}
|
||||
|
||||
//pub fn get_cached_resources(&mut self) -> Vec<Resource> {}
|
||||
|
||||
/*pub fn cache_rsc(&mut self, rsc: Resource) {
|
||||
self.cache.insert(rsc.url().clone(), rsc);
|
||||
}*/
|
||||
|
||||
pub fn delay_rsc(&mut self, rsc: Resource) {
|
||||
pub fn _delay_rsc(&mut self, rsc: Resource) {
|
||||
self.queried_cached_ids.push(rsc.id().clone());
|
||||
self.cache.insert(rsc.id().clone(), rsc);
|
||||
}
|
||||
|
||||
@@ -128,9 +128,9 @@ impl From<query::Allsky> for AllskyRequest {
|
||||
Ok(allsky_tiles)
|
||||
}
|
||||
_ => {
|
||||
let mut opts = RequestInit::new();
|
||||
opts.method("GET");
|
||||
opts.mode(RequestMode::Cors);
|
||||
let opts = RequestInit::new();
|
||||
opts.set_method("GET");
|
||||
opts.set_mode(RequestMode::Cors);
|
||||
let window = web_sys::window().unwrap_abort();
|
||||
|
||||
let request = web_sys::Request::new_with_str_and_init(&url_clone, &opts)?;
|
||||
|
||||
@@ -61,9 +61,9 @@ impl From<query::PixelMetadata> for PixelMetadataRequest {
|
||||
let request = match channel {
|
||||
ChannelType::R32F | ChannelType::R32I | ChannelType::R16I | ChannelType::R8UI => {
|
||||
Request::new(async move {
|
||||
let mut opts = RequestInit::new();
|
||||
opts.method("GET");
|
||||
opts.mode(RequestMode::Cors);
|
||||
let opts = RequestInit::new();
|
||||
opts.set_method("GET");
|
||||
opts.set_mode(RequestMode::Cors);
|
||||
|
||||
let request =
|
||||
web_sys::Request::new_with_str_and_init(&url_clone, &opts).unwrap_abort();
|
||||
|
||||
@@ -60,9 +60,9 @@ impl From<query::Moc> for MOCRequest {
|
||||
|
||||
let window = web_sys::window().unwrap_abort();
|
||||
let request = Request::new(async move {
|
||||
let mut opts = RequestInit::new();
|
||||
opts.method("GET");
|
||||
opts.mode(RequestMode::Cors);
|
||||
let opts = RequestInit::new();
|
||||
opts.set_method("GET");
|
||||
opts.set_mode(RequestMode::Cors);
|
||||
|
||||
let request = web_sys::Request::new_with_str_and_init(&url_clone, &opts).unwrap_abort();
|
||||
let resp_value = JsFuture::from(window.fetch_with_request(&request)).await?;
|
||||
|
||||
@@ -141,9 +141,9 @@ impl From<query::Tile> for TileRequest {
|
||||
| ChannelType::R32I
|
||||
| ChannelType::R16I
|
||||
| ChannelType::R8UI => Request::new(async move {
|
||||
let mut opts = RequestInit::new();
|
||||
opts.method("GET");
|
||||
opts.mode(RequestMode::Cors);
|
||||
let opts = RequestInit::new();
|
||||
opts.set_method("GET");
|
||||
opts.set_mode(RequestMode::Cors);
|
||||
|
||||
let request =
|
||||
web_sys::Request::new_with_str_and_init(&url_clone, &opts).unwrap_abort();
|
||||
|
||||
@@ -28,7 +28,7 @@ impl<const N: usize> BitVector<N> {
|
||||
}
|
||||
|
||||
mod tests {
|
||||
use super::BitVector;
|
||||
|
||||
|
||||
#[test]
|
||||
fn test_bitvector_basic_op() {
|
||||
|
||||
@@ -7,15 +7,9 @@ use std::cell::RefCell;
|
||||
use std::collections::VecDeque;
|
||||
use std::rc::Rc;
|
||||
|
||||
use wasm_bindgen::prelude::wasm_bindgen;
|
||||
use wasm_bindgen::JsCast;
|
||||
|
||||
use crate::utils;
|
||||
const MAX_NUM_TILE_FETCHING: usize = 8;
|
||||
const MAX_QUERY_QUEUE_LENGTH: usize = 100;
|
||||
|
||||
use wasm_bindgen::JsValue;
|
||||
|
||||
pub struct TileFetcherQueue {
|
||||
// A stack of queries to fetch
|
||||
queries: VecDeque<query::Tile>,
|
||||
@@ -29,7 +23,7 @@ impl TileFetcherQueue {
|
||||
let queries = VecDeque::new();
|
||||
let base_tile_queries = Vec::new();
|
||||
let tiles_fetched_time = Time::now();
|
||||
let mut num_tiles_fetched = 0;
|
||||
let num_tiles_fetched = 0;
|
||||
Self {
|
||||
queries,
|
||||
base_tile_queries,
|
||||
@@ -123,56 +117,28 @@ impl TileFetcherQueue {
|
||||
// Request the allsky
|
||||
downloader.borrow_mut().fetch(query::Allsky::new(cfg));
|
||||
} else if cfg.get_min_depth_tile() == 0 {
|
||||
let hips_cdid = cfg.get_creator_did().to_string();
|
||||
let hips_url = cfg.get_root_url().to_string();
|
||||
let hips_fmt = cfg.get_format();
|
||||
let min_order = cfg.get_min_depth_texture();
|
||||
|
||||
let dl = downloader.clone();
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
utils::set_timeout(
|
||||
move || {
|
||||
for tile_cell in crate::healpix::cell::ALLSKY_HPX_CELLS_D0 {
|
||||
dl.borrow_mut().fetch(query::Tile::new(
|
||||
tile_cell,
|
||||
hips_cdid.clone(),
|
||||
hips_url.clone(),
|
||||
hips_fmt,
|
||||
));
|
||||
}
|
||||
},
|
||||
2_000,
|
||||
);
|
||||
}
|
||||
/*else {
|
||||
for texture_cell in crate::healpix::cell::ALLSKY_HPX_CELLS_D0 {
|
||||
for cell in texture_cell.get_tile_cells(cfg.delta_depth()) {
|
||||
let hips_url = cfg.get_root_url();
|
||||
let format = cfg.get_format();
|
||||
let query = query::Tile::new(&cell, hips_url.to_string(), format);
|
||||
self.append_base_tile(query, downloader);
|
||||
}
|
||||
{
|
||||
let hips_cdid = cfg.get_creator_did().to_string();
|
||||
let hips_url = cfg.get_root_url().to_string();
|
||||
let hips_fmt = cfg.get_format();
|
||||
let min_order = cfg.get_min_depth_texture();
|
||||
|
||||
let dl = downloader.clone();
|
||||
crate::utils::set_timeout(
|
||||
move || {
|
||||
for tile_cell in crate::healpix::cell::ALLSKY_HPX_CELLS_D0 {
|
||||
dl.borrow_mut().fetch(query::Tile::new(
|
||||
tile_cell,
|
||||
hips_cdid.clone(),
|
||||
hips_url.clone(),
|
||||
hips_fmt,
|
||||
));
|
||||
}
|
||||
},
|
||||
2_000,
|
||||
);
|
||||
}
|
||||
}*/
|
||||
|
||||
/*
|
||||
let f = async move {
|
||||
let mut cb = |resolve: js_sys::Function, reject: js_sys::Function| {
|
||||
web_sys::window()
|
||||
.unwrap()
|
||||
.set_timeout_with_callback_and_timeout_and_arguments_0(&resolve, 3000);
|
||||
};
|
||||
|
||||
let p = js_sys::Promise::new(&mut cb);
|
||||
|
||||
wasm_bindgen_futures::JsFuture::from(p).await.unwrap();
|
||||
|
||||
|
||||
|
||||
Ok(JsValue::from_bool(true))
|
||||
};
|
||||
|
||||
let _ = wasm_bindgen_futures::future_to_promise(f);
|
||||
*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,10 +96,6 @@ pub(super) fn merge_overlapping_intervals(mut intervals: Vec<Range<usize>>) -> V
|
||||
intervals
|
||||
}
|
||||
|
||||
use std::cell::Cell;
|
||||
use std::rc::Rc;
|
||||
use wasm_bindgen::closure::{Closure, WasmClosureFnOnce};
|
||||
use wasm_bindgen::JsCast;
|
||||
/*
|
||||
Execute a closure after some delay. This mimics the javascript built-in setTimeout procedure.
|
||||
*/
|
||||
@@ -108,6 +104,11 @@ pub(crate) fn set_timeout<F>(f: F, delay: i32)
|
||||
where
|
||||
F: 'static + FnOnce() -> (),
|
||||
{
|
||||
use std::cell::Cell;
|
||||
use std::rc::Rc;
|
||||
use wasm_bindgen::closure::Closure;
|
||||
use wasm_bindgen::JsCast;
|
||||
|
||||
let timeout_id = Rc::new(Cell::new(0));
|
||||
let t_id = timeout_id.clone();
|
||||
let cb = Closure::once_into_js(move || {
|
||||
|
||||
10
src/js/A.js
10
src/js/A.js
@@ -40,7 +40,6 @@ import { ProgressiveCat } from "./ProgressiveCat.js";
|
||||
import { Source } from "./Source.js";
|
||||
import { Coo } from "./libs/astro/coo.js";
|
||||
import { URLBuilder } from "./URLBuilder.js";
|
||||
import { ColorCfg } from './ColorCfg.js';
|
||||
import { Footprint } from './Footprint.js';
|
||||
import { Aladin } from "./Aladin.js";
|
||||
import { ActionButton } from "./gui/Widgets/ActionButton.js";
|
||||
@@ -280,10 +279,6 @@ A.circle = function (ra, dec, radiusDeg, options) {
|
||||
return new Circle([ra, dec], radiusDeg, options);
|
||||
};
|
||||
|
||||
A.footprint = function(shapes) {
|
||||
return new Footprint(shapes)
|
||||
};
|
||||
|
||||
/**
|
||||
* Creates an ellipse shape
|
||||
*
|
||||
@@ -389,8 +384,9 @@ A.coo = function (longitude, latitude, prec) {
|
||||
* @memberof A
|
||||
* @name footprint
|
||||
*
|
||||
* @param {A.polygon[]} shapes - an array of A.polygon objects
|
||||
* @param {A.source} source - a A.source object
|
||||
* @param {Circle[]|Polyline[]|Ellipse[]|Vector[]} shapes - an array of A.polygon objects
|
||||
* @param {Source} [source] - a A.source object associated with the footprint
|
||||
*
|
||||
* @returns {Footprint} Returns a new Footprint object
|
||||
*/
|
||||
A.footprint = function(shapes, source) {
|
||||
|
||||
@@ -1426,6 +1426,8 @@ export let Aladin = (function () {
|
||||
|
||||
Aladin.prototype.addMOC = function (moc) {
|
||||
this.view.addMOC(moc);
|
||||
|
||||
// see MOC.setView for sending it to outside the UI
|
||||
};
|
||||
|
||||
Aladin.prototype.addUI = function (ui) {
|
||||
|
||||
@@ -580,14 +580,19 @@ export let Catalog = (function () {
|
||||
if (shapes) {
|
||||
shapes = [].concat(shapes);
|
||||
|
||||
// 1. return of the shape func is an image
|
||||
if (shapes.length == 1 && (shapes[0] instanceof Image || shapes[0] instanceof HTMLCanvasElement)) {
|
||||
source.setImage(shapes[0]);
|
||||
// 2. return of the shape is a set of shapes or a footprint
|
||||
} else {
|
||||
shapes = new Footprint(shapes, source);
|
||||
let footprint;
|
||||
if (shapes.length == 1 && shapes[0] instanceof Footprint) {
|
||||
footprint = shapes[0];
|
||||
} else {
|
||||
footprint = new Footprint(shapes, source);
|
||||
}
|
||||
|
||||
let footprint = shapes;
|
||||
this._shapeIsFootprintFunction = true;
|
||||
|
||||
footprint.setCatalog(this);
|
||||
|
||||
// store the footprints
|
||||
@@ -596,6 +601,7 @@ export let Catalog = (function () {
|
||||
}
|
||||
} catch (e) {
|
||||
// do not create the footprint
|
||||
console.warn("Return of shape function could not be interpreted as a footprint");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -699,8 +705,12 @@ export let Catalog = (function () {
|
||||
}
|
||||
};
|
||||
|
||||
Catalog.prototype.setView = function (view) {
|
||||
Catalog.prototype.setView = function (view, idx) {
|
||||
this.view = view;
|
||||
|
||||
this.view.catalogs.push(this);
|
||||
this.view.insertOverlay(this, idx);
|
||||
|
||||
this.reportChange();
|
||||
};
|
||||
|
||||
@@ -895,8 +905,6 @@ export let Catalog = (function () {
|
||||
|
||||
f.draw(ctx, this.view);
|
||||
f.source.tooSmallFootprint = f.isTooSmall();
|
||||
// propagate the info that the footprint is too small
|
||||
//f.source.tooSmallFootprint = f.isTooSmall
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -209,7 +209,7 @@ export let Footprint= (function() {
|
||||
return this.shapes.some((shape) => shape.isInStroke(ctx, view, x, y));
|
||||
};
|
||||
|
||||
Footprint.prototype.isTooSmall = function(view) {
|
||||
Footprint.prototype.isTooSmall = function() {
|
||||
return this.shapes.every((shape) => shape.isTooSmall);
|
||||
};
|
||||
|
||||
|
||||
@@ -123,7 +123,7 @@ export let MOC = (function() {
|
||||
this.errorCallback = errorCallback;
|
||||
};
|
||||
|
||||
MOC.prototype.setView = function(view) {
|
||||
MOC.prototype.setView = function(view, idx) {
|
||||
let self = this;
|
||||
|
||||
this.view = view;
|
||||
@@ -160,7 +160,7 @@ export let MOC = (function() {
|
||||
|
||||
// Add it to the view
|
||||
self.view.mocs.push(self);
|
||||
self.view.allOverlayLayers.push(self);
|
||||
self.view.insertOverlay(self, idx);
|
||||
|
||||
// Tell the MOC has been fully loaded and can be sent as an event
|
||||
ALEvent.GRAPHIC_OVERLAY_LAYER_ADDED.dispatchedTo(self.view.aladinDiv, {layer: self});
|
||||
|
||||
@@ -226,8 +226,12 @@ export let GraphicOverlay = (function() {
|
||||
}
|
||||
};
|
||||
|
||||
GraphicOverlay.prototype.setView = function(view) {
|
||||
GraphicOverlay.prototype.setView = function(view, idx) {
|
||||
console.trace()
|
||||
this.view = view;
|
||||
|
||||
this.view.overlays.push(this);
|
||||
this.view.insertOverlay(this, idx);
|
||||
};
|
||||
|
||||
GraphicOverlay.prototype.removeAll = function() {
|
||||
|
||||
@@ -216,10 +216,13 @@ export let ProgressiveCat = (function() {
|
||||
|
||||
ProgressiveCat.prototype = {
|
||||
|
||||
init: function(view) {
|
||||
setView: function(view, idx) {
|
||||
var self = this;
|
||||
this.view = view;
|
||||
|
||||
this.view.catalogs.push(this);
|
||||
this.view.insertOverlay(this, idx);
|
||||
|
||||
if (this.maxOrder && this.frameStr) {
|
||||
this._loadMetadata();
|
||||
}
|
||||
|
||||
@@ -62,6 +62,15 @@ export let View = (function () {
|
||||
|
||||
let self = this;
|
||||
|
||||
// reference to all overlay layers (= catalogs + overlays + mocs)
|
||||
this.allOverlayLayers = []
|
||||
// current catalogs displayed
|
||||
this.catalogs = [];
|
||||
// overlays (footprints for instance)
|
||||
this.overlays = [];
|
||||
// MOCs
|
||||
this.mocs = [];
|
||||
|
||||
self.redrawClbk = this.redraw.bind(this);
|
||||
// Init the WebGL context
|
||||
// At this point, the view has been created so the image canvas too
|
||||
@@ -202,8 +211,6 @@ export let View = (function () {
|
||||
this.imageLayers = new Map();
|
||||
|
||||
this.overlayLayers = [];
|
||||
// current catalogs displayed
|
||||
this.catalogs = [];
|
||||
// a dedicated catalog for the popup
|
||||
var c = document.createElement('canvas');
|
||||
c.width = c.height = 24;
|
||||
@@ -220,17 +227,10 @@ export let View = (function () {
|
||||
ctx.stroke();
|
||||
this.catalogForPopup = A.catalog({ shape: c, sourceSize: 24 });
|
||||
this.catalogForPopup.hide();
|
||||
this.catalogForPopup.setView(this);
|
||||
this.catalogForPopup.view = this;
|
||||
this.overlayForPopup = A.graphicOverlay({color: '#ee2345', lineWidth: 3});
|
||||
this.overlayForPopup.hide();
|
||||
this.overlayForPopup.setView(this);
|
||||
|
||||
// overlays (footprints for instance)
|
||||
this.overlays = [];
|
||||
// MOCs
|
||||
this.mocs = [];
|
||||
// reference to all overlay layers (= catalogs + overlays + mocs)
|
||||
this.allOverlayLayers = []
|
||||
this.overlayForPopup.view = this;
|
||||
|
||||
this.empty = true;
|
||||
|
||||
@@ -2099,28 +2099,19 @@ export let View = (function () {
|
||||
this.removeOverlay(layer);
|
||||
};
|
||||
|
||||
View.prototype.addCatalog = function (catalog) {
|
||||
catalog.name = this.makeUniqLayerName(catalog.name);
|
||||
this.allOverlayLayers.push(catalog);
|
||||
this.catalogs.push(catalog);
|
||||
if (catalog.type == 'catalog') {
|
||||
catalog.setView(this);
|
||||
}
|
||||
else if (catalog.type == 'progressivecat') {
|
||||
catalog.init(this);
|
||||
}
|
||||
};
|
||||
|
||||
View.prototype.addOverlay = function (overlay) {
|
||||
View.prototype.add = function(overlay) {
|
||||
overlay.name = this.makeUniqLayerName(overlay.name);
|
||||
this.overlays.push(overlay);
|
||||
this.allOverlayLayers.push(overlay);
|
||||
overlay.setView(this);
|
||||
|
||||
let idx = this.allOverlayLayers.length;
|
||||
overlay.setView(this, idx);
|
||||
};
|
||||
|
||||
View.prototype.addMOC = function (moc) {
|
||||
moc.name = this.makeUniqLayerName(moc.name);
|
||||
moc.setView(this);
|
||||
View.prototype.addMOC = View.prototype.add;
|
||||
View.prototype.addOverlay = View.prototype.add;
|
||||
View.prototype.addCatalog = View.prototype.add;
|
||||
|
||||
View.prototype.insertOverlay = function(overlay, idx) {
|
||||
this.allOverlayLayers.splice(idx, 0, overlay);
|
||||
};
|
||||
|
||||
// update objLookup, lookup table
|
||||
|
||||
@@ -192,10 +192,20 @@ export let Circle = (function() {
|
||||
};
|
||||
|
||||
// TODO
|
||||
Circle.prototype.draw = function(ctx, view, noStroke) {
|
||||
Circle.prototype.draw = function(ctx, view, noStroke, noSmallCheck) {
|
||||
if (! this.isShowing) {
|
||||
return false;
|
||||
}
|
||||
|
||||
noSmallCheck = noSmallCheck===true || false;
|
||||
if (!noSmallCheck) {
|
||||
const px_per_deg = view.width / view.fov;
|
||||
this.isTooSmall = this.radiusDegrees * 2 * px_per_deg < this.lineWidth;
|
||||
if (this.isTooSmall) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
noStroke = noStroke===true || false;
|
||||
|
||||
var centerXyview = view.aladin.world2pix(this.centerRaDec[0], this.centerRaDec[1]);
|
||||
|
||||
@@ -248,7 +248,7 @@ export let Polyline = (function() {
|
||||
return this.closed;
|
||||
}
|
||||
|
||||
Polyline.prototype.draw = function(ctx, view, noStroke) {
|
||||
Polyline.prototype.draw = function(ctx, view, noStroke, noSmallCheck) {
|
||||
if (! this.isShowing) {
|
||||
return false;
|
||||
}
|
||||
@@ -257,6 +257,7 @@ export let Polyline = (function() {
|
||||
return false;
|
||||
}
|
||||
|
||||
noSmallCheck = noSmallCheck===true || false;
|
||||
noStroke = noStroke===true || false;
|
||||
|
||||
var baseColor = this.color;
|
||||
@@ -307,13 +308,18 @@ export let Polyline = (function() {
|
||||
ymax = Math.max(ymax, xyview[1]);
|
||||
}
|
||||
|
||||
// 2. do not draw the polygon if it lies in less than linewidth pixels
|
||||
// 2. do not draw the polygon if it lies outside the view
|
||||
if (xmax < 0 || xmin > view.width || ymax < 0 || ymin > view.height) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ((xmax - xmin) < this.lineWidth || (ymax - ymin) < this.lineWidth) {
|
||||
return false;
|
||||
// do not draw neither if the polygone does not lie inside lineWidth
|
||||
if (!noSmallCheck) {
|
||||
this.isTooSmall = (xmax - xmin) < this.lineWidth || (ymax - ymin) < this.lineWidth;
|
||||
|
||||
if (this.isTooSmall) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
let drawLine;
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 92 KiB After Width: | Height: | Size: 92 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 347 KiB After Width: | Height: | Size: 352 KiB |
Reference in New Issue
Block a user