browser/index.js overwrites window.screen
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- javascript
- 領域
- frontend
調査の方向性
まず browser/index.js を読み、Windows、Android、または iOS のブラウザーで Jimp 1.6.0 のブラウザーパッケージを使って問題を再現し、バージョン 0.22.12 と比較します。完了条件は、Jimp が引き続き読み込まれ、window.screen が Jimp の screen 関数になるのではなく、ブラウザーの画面情報を保持することです。
索引モデルが issue の本文から書いたものです。
説明
Expected Behavior
When using the browser/index.js, Jimp works fine however it overwrites window.screen and causes out application issues when needing the screen details to adjust the UX. I would expect the Jimp required global/window functions not to collide with standard objects. details of the screen standard here: https://developer.mozilla.org/en-US/docs/Web/API/Window/screen. We did not see this issue in 0.22.12 or earlier releases of Jimp.
Current Behavior
With Jimp 0.22.12, window.screen is:
Screen {
availHeight: 1366
availLeft: 0
availTop: 0
availWidth: 1024
colorDepth: 24
height: 1366
isExtended: true
onchange: null
orientation: ScreenOrientation {angle: 0, type: 'portrait-primary', onchange: null}
pixelDepth: 24
width: 1024
}
With Jimp 1.6.0 via browser/index.js:
function screen(e, t, i=1) {
e.a *= i;
const r = t.a + e.a - t.a * e.a
, n = e.r * e.a
, a = e.g * e.a
, o = e.b * e.a
, s = t.r * t.a
, l = t.g * t.a
, u = t.b * t.a;
return {
r: (n * t.a + s * e.a - n * s + n * (1 - t.a) + s * (1 - e.a)) / r,
g: (a * t.a + l * e.a - a * l + a * (1 - t.a) + l * (1 - e.a)) / r,
b: (o * t.a + u * e.a - o * u + o * (1 - t.a) + u * (1 - e.a)) / r,
a: r
}
}
Failure Information (for bugs)
The failure is the blocking of the screen information when using Jimp 1.6.0.
Steps to Reproduce
- 主要言語
- TypeScript
- スター
- 14.7k
- フォーク
- 777
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
jimp-dev/jimp のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
Add blit changes to migration guide.対応中かも @ryanchou1994 が 44 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
documentation help wanted solution in issue
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 62/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
Northeastern-Electric-Racing/FinishLine#4660 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
excaliburjs/Excalibur#3895 ·
メンテナーはふだん 3 日以内に返信
-
infer_audio_type only recognises one MPEG Layer III frame header, so most MP3 files are rejected対応中かも @Steve-20-ai が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
Earn report crashes with "RangeError: Invalid time value" when a report row has an unparsable timestamp対応中かも @Gurkaran18 が今日担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
joinmarket-webui/jam#1588 ·
メンテナーはふだん 3 日以内に返信
-
BeOS .json missingオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
mihaip/infinite-mac#475 ·