support increased render limit within the plugin
This commit is contained in:
parent
b8a86f8d08
commit
c86e8608bf
@ -20,7 +20,8 @@ function wrapper() {
|
|||||||
window.plugin.maxLinks = function() {};
|
window.plugin.maxLinks = function() {};
|
||||||
|
|
||||||
// const values
|
// const values
|
||||||
window.plugin.maxLinks.MAX_DRAWN_LINKS = 400;
|
var MAX_DRAWN_LINKS = 400;
|
||||||
|
var MAX_DRAWN_LINKS_INCREASED_LIMIT = 1000;
|
||||||
var STROKE_STYLE = {
|
var STROKE_STYLE = {
|
||||||
color: '#FF0000',
|
color: '#FF0000',
|
||||||
opacity: 1,
|
opacity: 1,
|
||||||
@ -63,8 +64,9 @@ function wrapper() {
|
|||||||
var triangles = window.delaunay.triangulate(locations);
|
var triangles = window.delaunay.triangulate(locations);
|
||||||
var drawnLinks = 0;
|
var drawnLinks = 0;
|
||||||
renderLimitReached = false;
|
renderLimitReached = false;
|
||||||
|
var renderlimit = window.USE_INCREASED_RENDER_LIMIT ? MAX_DRAWN_LINKS_INCREASED_LIMIT : MAX_DRAWN_LINKS;
|
||||||
$.each(triangles, function(idx, triangle) {
|
$.each(triangles, function(idx, triangle) {
|
||||||
if (drawnLinks <= window.plugin.maxLinks.MAX_DRAWN_LINKS) {
|
if (drawnLinks <= renderlimit) {
|
||||||
triangle.draw(window.plugin.maxLinks.layer, minX, minY)
|
triangle.draw(window.plugin.maxLinks.layer, minX, minY)
|
||||||
drawnLinks += 3;
|
drawnLinks += 3;
|
||||||
} else {
|
} else {
|
||||||
|
@ -39,7 +39,7 @@ window.plugin.renderLimitIncrease.setHigherLimits = function() {
|
|||||||
window.MAX_DRAWN_PORTALS = 3000;
|
window.MAX_DRAWN_PORTALS = 3000;
|
||||||
window.MAX_DRAWN_LINKS = 1000;
|
window.MAX_DRAWN_LINKS = 1000;
|
||||||
window.MAX_DRAWN_FIELDS = 500;
|
window.MAX_DRAWN_FIELDS = 500;
|
||||||
|
window.USE_INCREASED_RENDER_LIMIT = true; // Used for other plugins
|
||||||
};
|
};
|
||||||
|
|
||||||
var setup = window.plugin.renderLimitIncrease.setHigherLimits;
|
var setup = window.plugin.renderLimitIncrease.setHigherLimits;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user