opentiny / opentiny/tiny-editor

✨ [Feature]: 希望图片伸缩可以支持设置最小宽高

Open
#386 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
535
Forks
71
Avg merge
6h 50m
Merged PRs (30d)
2

Description

What problem does this feature solve

目前图片最小只能缩小到 40*40,有点局限,有些业务希望图片更小一些,希望能自定义图片能缩小到的最小宽高。

Image
What does the proposed API look like

期望 API(如果有会更好的 API 设计也可以一起讨论):

new TinyEditor({
  modules: {
    image: {
      minWidth: '10px',
      minHeight: '10px'
    }
  }
})
What is your project name

Wiki

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the TinyEditor image module and the existing 40×40 minimum resize constraint. Review how the proposed modules.image minWidth and minHeight options could be represented and applied. Done means image resizing honors configurable minimum width and height values, with appropriate behavior when they are not provided.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.