if (document.querySelector('#fullpage')) {
if (window.innerWidth >= 993) {
let isNavigationEnabled = true; // Флаг для отслеживания состояния автопрокрутки
const fullPageInstance = new fullpage('#fullpage', {
navigation: isNavigationEnabled,
navigationPosition: 'left',
scrollHorizontally: true,
onLeave: function(origin, destination, direction, trigger) {
var origin = this;
const el = document.querySelector('.header__column-location');
el.classList.remove("view");
if (origin.index == 0 && direction =='down') {
document.querySelector('#fp-nav.fp-left').classList.add('scroll');
} else if (origin.index == 2 && direction == 'down') {
document.querySelector('#fp-nav.fp-left').classList.remove('scroll');
} else if (origin.index == 3 && direction == 'down') {
document.querySelector('#fp-nav.fp-left').classList.add('scroll');
} else if (origin.index == 6 && direction == 'down') {
document.querySelector('#fp-nav.fp-left').classList.remove('scroll');
} else if (origin.index == 7 && direction == 'up') {
document.querySelector('#fp-nav.fp-left').classList.add('scroll');
} else if (origin.index == 4 && direction == 'up') {
document.querySelector('#fp-nav.fp-left').classList.remove('scroll');
} else if (origin.index == 3 && direction == 'up') {
document.querySelector('#fp-nav.fp-left').classList.add('scroll');
} else if (origin.index == 1 && direction == 'up') {
document.querySelector('#fp-nav.fp-left').classList.remove('scroll');
};
},
});
}
}
const swiper = document.querySelector('.swiper')
if(swiper){
swiper.onmouseenter = () => {
const X = window.scrollX
const Y = window.scrollY
window.onscroll = () => {
window.scrollTo(X, Y)
}
swiper.onmouseleave = () => {
window.onscroll = () => null
}
}
}
from xxxxx import *
def myfunc():
forward(12*100)
right(940)
print(cherepashka(myfunc()))
from turtle import *
def cherepashka(mn):
color("black", "red")
m = 100
begin_fill()
for i in range(4):
mn
end_fill()
canvas = getcanvas()
cnt = 0
for y in range(-100*m, 100*m, m):
for x in range(-100*m, 100*m, m):
item = canvas.find_overlapping(x,y,x,y)
if len(item) == 1 and item[0] == 5:
cnt += 1
return(cnt)
done()
exit()