Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

图片添加可自由改变大小(待优化) #424

Merged
merged 1 commit into from
Apr 2, 2019
Merged

图片添加可自由改变大小(待优化) #424

merged 1 commit into from
Apr 2, 2019

Conversation

ArthasDragon
Copy link
Contributor

为图片增加自由改变大小功能

@margox
Copy link
Owner

margox commented Apr 2, 2019

哇,最近正准备着手干这个的,你这个PR来的太及时了!感谢!

@margox margox merged commit 45ea4e8 into margox:master Apr 2, 2019
@ArthasDragon
Copy link
Contributor Author

我写的还有待优化0.0,现在工程package.json是不是少一些模块

@margox
Copy link
Owner

margox commented Apr 2, 2019

少了哪些模块?我刚才merge之后pull下来跑了一下,没出现缺少模块之类的错误哈

@ArthasDragon
Copy link
Contributor Author

没有 我看错了,刚发现playground文件夹里面还有一个

@ArthasDragon
Copy link
Contributor Author

hideToolbar = (event) => {
    event.preventDefault()
    this.setState({
      toolbarVisible: false
    }, () => {
      this.unlockEditor()
      // this.props.editor.requestFocus()    这个requestFocus是为什么写的   现在和我加的这个好像有冲突
    })
  }

@margox
Copy link
Owner

margox commented Apr 2, 2019

因为某些原因,在鼠标放到图片上的时候,需要让编辑器blur掉,鼠标移开之后再将其重新focus,所以才有这一步。你注释掉这一步的话,影响切实也不大。

@ArthasDragon
Copy link
Contributor Author

可能当触发requestFocus方法的时候,编辑器里面的bf-media会重新渲染,就会报错

 Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application.

@zzfScarecrow
Copy link

二位大佬,如何把这个功能关掉

@margox
Copy link
Owner

margox commented Jun 25, 2019

@zzfScarecrow 升级到2.3.7,然后给imageResizable属性传个false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants