I am trying to stabilize this d3js fluid rectangle shape code. I test it with different sizes, but the configuration does not hold - as always its offset.
- this option has a switch between a rectangular or circular sensor http://jsfiddle.net/0ht35rpb/132/
this setting adjusts the clipping path accordingly
fillGroup.append("rect") .attr("x", config.width - 5 + config.margin) .attr("y", config.margin) .attr("width", config.width - 2 * config.margin) .attr("height", config.height - 2 * config.margin)
// Jug 0
http://jsfiddle.net/0ht35rpb/151/
// jug 1
http://jsfiddle.net/0ht35rpb/154
// Jug 2 - clipping starts to jump
http://jsfiddle.net/0ht35rpb/155
// Yaig 3 - clipping jump more obvious
http://jsfiddle.net/0ht35rpb/156
2 , (jsfiddle.net/0ht35rpb/156):
1) waveGroupXPosition - config.width - config.width/2
waveGroupXPosition
- config.width
- config.width/2
2) animateWave(), (0,0) (config.width, 0). :
animateWave()
(0,0)
(config.width, 0)
function animateWave() { wave.attr('transform','translate(0,0)'); wave.transition() .duration(config.waveAnimateTime) .ease(d3.easeLinear) .attr('transform',`translate(${config.width},0)`) .on('end', animateWave); }
: http://jsfiddle.net/xpb0hsey/
Source: https://habr.com/ru/post/1684917/More articles:Reusing pytest fixtures - pythonКак получить все неперекрывающиеся перестановки для ряда временных блоков? - c#Упорядоченная перестановка списка - c#Convert int to char in C - cwatermark error d3.js - javascriptGetting NoSuchElementError on check to check if modal is open or not - javascriptКак решить: Ошибка: выполнение выполнено для задачи ': app: kaptDebugKotlin'? - javad3 height of the water height diagram - revitalization of shunting - when the value reaches a peak above 90%? - javascriptКак можно блокировать структурированный атомный тип? - c++What is the leak of space? - memory-leaksAll Articles