Skip to content

Commit c28834e

Browse files
line 218
1 parent 4c73aa8 commit c28834e

1 file changed

Lines changed: 18 additions & 18 deletions

File tree

3-frames-and-windows/01-popup-windows/article.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -172,50 +172,50 @@ newWindow.onload = function() {
172172
```
173173

174174

175-
## Moving and resizing
175+
## حرکت دادن و تغییر اندازه
176176

177-
There are methods to move/resize a window:
177+
راه‌هایی برای جابه‌جایی/تغییر اندازه‌ی یک پنجره وجود دارد:
178178

179179
`win.moveBy(x,y)`
180-
: Move the window relative to current position `x` pixels to the right and `y` pixels down. Negative values are allowed (to move left/up).
180+
: پنجره را نسبت به موقعیت فعلی، `x` پیکسل به سمت راست و `y` پیکسل به سمت پایین حرکت می‌دهد. مقادیر منفی هم مجاز هستند (برای حرکت دادن به چپ/بالا)
181181

182182
`win.moveTo(x,y)`
183-
: Move the window to coordinates `(x,y)` on the screen.
183+
: پنجره را به مختصات `(x,y)` در صفحه می‌برد.
184184

185185
`win.resizeBy(width,height)`
186-
: Resize the window by given `width/height` relative to the current size. Negative values are allowed.
186+
: پنجره را با اندازه‌های `width/height` داده شده نسبت به اندازه‌ی فعلی تغییر سایز می‌دهد. مقادیر منفی مجاز هستند.
187187

188188
`win.resizeTo(width,height)`
189-
: Resize the window to the given size.
189+
: پنجره را به اندازه‌ی داده شده تغییر اندازه می‌دهد.
190190

191-
There's also `window.onresize` event.
191+
همچنین یک `window.onresize` event نیز وجود دارد.
192192

193-
```warn header="Only popups"
194-
To prevent abuse, the browser usually blocks these methods. They only work reliably on popups that we opened, that have no additional tabs.
193+
```warn header="فقط popups"
194+
.برای اینکه از سواستفاده جلوگیری شود، مرورگر معمولا این متدها را مسدود می‌کنند. آن‌ها فقط روی پنجره‌های بازشو که هیچ صفحه‌ی اضافی ندارند، به‌ طور قابل اعتماد کار می‌کنند
195195
```
196196

197197
```warn header="No minification/maximization"
198-
JavaScript has no way to minify or maximize a window. These OS-level functions are hidden from Frontend-developers.
198+
.پنهان هستند Frontend-developers هیچ راهی برای به حداقل رساندن یا به حداکثر رساندن یک پنجره نیست. این متدها که در سطح سیستم‌عامل هستند از دید JavaScript در
199199
200-
Move/resize methods do not work for maximized/minimized windows.
200+
.روش‌های جابجایی/تغییر اندازه برای پنجره‌های حداکثر/حداقل شده کار نمی‌کنند
201201
```
202202

203-
## Scrolling a window
203+
## پیمایش یک پنجره
204204

205-
We already talked about scrolling a window in the chapter <info:size-and-scroll-window>.
205+
ما قبلا در مورد scroll کردن یک پنجره در بخش <info:size-and-scroll-window> صحبت کرده‌ایم.
206206

207207
`win.scrollBy(x,y)`
208-
: Scroll the window `x` pixels right and `y` down relative the current scroll. Negative values are allowed.
208+
: پنجره را نسبت به scroll فعلی، `x` پیکسل به راست و `y` پیکسل به پایین scroll می‌کند. مقادیر منفی مجاز هستند.
209209

210210
`win.scrollTo(x,y)`
211-
: Scroll the window to the given coordinates `(x,y)`.
211+
: پنجره را به مختصات داده شده `(x,y)` scroll می‌کند.
212212

213213
`elem.scrollIntoView(top = true)`
214-
: Scroll the window to make `elem` show up at the top (the default) or at the bottom for `elem.scrollIntoView(false)`.
214+
: پنجره را scroll می‌کند که `elem` را در بالا (پیش فرض) یا پایین برای `elem.scrollIntoView(false)` نمایش دهد.
215215

216-
There's also `window.onscroll` event.
216+
همچنین یک `window.onscroll` event نیز هست.
217217

218-
## Focus/blur on a window
218+
## Focus/blur روی یک پنجره
219219

220220
Theoretically, there are `window.focus()` and `window.blur()` methods to focus/unfocus on a window. And there are also `focus/blur` events that allow to catch the moment when the visitor focuses on a window and switches elsewhere.
221221

0 commit comments

Comments
 (0)