New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-ace

Package Overview
Dependencies
Maintainers
1
Versions
103
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-ace - npm Package Compare versions

Comparing version 2.7.0 to 2.8.0

36

lib/ace.js

@@ -127,10 +127,29 @@ 'use strict';

componentWillReceiveProps: function componentWillReceiveProps(nextProps) {
this.editor.getSession().setMode('ace/mode/' + nextProps.mode);
this.editor.setTheme('ace/theme/' + nextProps.theme);
this.editor.setFontSize(nextProps.fontSize);
this.editor.setOption('maxLines', nextProps.maxLines);
this.editor.setOption('readOnly', nextProps.readOnly);
this.editor.setOption('highlightActiveLine', nextProps.highlightActiveLine);
this.editor.setOption('tabSize', nextProps.tabSize);
this.editor.setShowPrintMargin(nextProps.showPrintMargin);
if (nextProps.mode !== this.props.mode) {
this.editor.getSession().setMode('ace/mode/' + nextProps.mode);
}
if (nextProps.theme !== this.props.theme) {
this.editor.setTheme('ace/theme/' + nextProps.theme);
}
if (nextProps.fontSize !== this.props.fontSize) {
this.editor.setFontSize(nextProps.fontSize);
}
if (nextProps.maxLines !== this.props.maxLines) {
this.editor.setOption('maxLines', nextProps.maxLines);
}
if (nextProps.readOnly !== this.props.readOnly) {
this.editor.setOption('readOnly', nextProps.readOnly);
}
if (nextProps.highlightActiveLine !== this.props.highlightActiveLine) {
this.editor.setOption('highlightActiveLine', nextProps.highlightActiveLine);
}
if (nextProps.tabSize !== this.props.tabSize) {
this.editor.setOption('tabSize', nextProps.tabSize);
}
if (nextProps.showPrintMargin !== this.props.showPrintMargin) {
this.editor.setShowPrintMargin(nextProps.showPrintMargin);
}
if (nextProps.showGutter !== this.props.showGutter) {
this.editor.renderer.setShowGutter(nextProps.showGutter);
}
if (this.editor.getValue() !== nextProps.value) {

@@ -142,3 +161,2 @@ // editor.setValue is a synchronous function call, change event is emitted before setValue return.

}
this.editor.renderer.setShowGutter(nextProps.showGutter);
},

@@ -145,0 +163,0 @@

{
"name": "react-ace",
"version": "2.7.0",
"version": "2.8.0",
"description": "A react component for Ace Editor",

@@ -5,0 +5,0 @@ "main": "lib/ace.js",

@@ -125,10 +125,29 @@ var ace = require('brace');

componentWillReceiveProps: function(nextProps) {
this.editor.getSession().setMode('ace/mode/' + nextProps.mode);
this.editor.setTheme('ace/theme/' + nextProps.theme);
this.editor.setFontSize(nextProps.fontSize);
this.editor.setOption('maxLines', nextProps.maxLines);
this.editor.setOption('readOnly', nextProps.readOnly);
this.editor.setOption('highlightActiveLine', nextProps.highlightActiveLine);
this.editor.setOption('tabSize', nextProps.tabSize);
this.editor.setShowPrintMargin(nextProps.showPrintMargin);
if (nextProps.mode !== this.props.mode) {
this.editor.getSession().setMode('ace/mode/' + nextProps.mode);
}
if (nextProps.theme !== this.props.theme) {
this.editor.setTheme('ace/theme/' + nextProps.theme);
}
if (nextProps.fontSize !== this.props.fontSize) {
this.editor.setFontSize(nextProps.fontSize);
}
if (nextProps.maxLines !== this.props.maxLines) {
this.editor.setOption('maxLines', nextProps.maxLines);
}
if (nextProps.readOnly !== this.props.readOnly) {
this.editor.setOption('readOnly', nextProps.readOnly);
}
if (nextProps.highlightActiveLine !== this.props.highlightActiveLine) {
this.editor.setOption('highlightActiveLine', nextProps.highlightActiveLine);
}
if (nextProps.tabSize !== this.props.tabSize) {
this.editor.setOption('tabSize', nextProps.tabSize);
}
if (nextProps.showPrintMargin !== this.props.showPrintMargin) {
this.editor.setShowPrintMargin(nextProps.showPrintMargin);
}
if (nextProps.showGutter !== this.props.showGutter) {
this.editor.renderer.setShowGutter(nextProps.showGutter);
}
if (this.editor.getValue() !== nextProps.value) {

@@ -140,3 +159,2 @@ // editor.setValue is a synchronous function call, change event is emitted before setValue return.

}
this.editor.renderer.setShowGutter(nextProps.showGutter);
},

@@ -143,0 +161,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc