Browse Source

chore: fix some typos in comment (#6378)

Signed-off-by: jiangmencity <jiangmen@52it.net>
fix-style-input-constraints
jiangmencity 1 year ago
committed by GitHub
parent
commit
cd8e95fee3
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 4
      docs/api/canvas.md
  2. 2
      packages/core/src/canvas/index.ts
  3. 2
      packages/core/src/canvas/types.ts
  4. 2
      packages/core/src/css_composer/view/CssRulesView.ts
  5. 2
      packages/core/src/dom_components/view/ComponentTextView.ts

4
docs/api/canvas.md

@ -106,7 +106,7 @@ editor.on('canvas:frame:load', ({ window }) => {
}); });
``` ```
* `canvas:frame:load:head` Frame head loaded in canvas. The event is triggered right after iframe's finished to load the head elemenets (eg. scripts) * `canvas:frame:load:head` Frame head loaded in canvas. The event is triggered right after iframe's finished to load the head elements (eg. scripts)
```javascript ```javascript
editor.on('canvas:frame:load:head', ({ window }) => { editor.on('canvas:frame:load:head', ({ window }) => {
@ -246,7 +246,7 @@ passed to it. For instance, you can scroll smoothly by using
const selected = editor.getSelected(); const selected = editor.getSelected();
// Scroll smoothly (this behavior can be polyfilled) // Scroll smoothly (this behavior can be polyfilled)
canvas.scrollTo(selected, { behavior: 'smooth' }); canvas.scrollTo(selected, { behavior: 'smooth' });
// Force the scroll, even if the element is alredy visible // Force the scroll, even if the element is already visible
canvas.scrollTo(selected, { force: true }); canvas.scrollTo(selected, { force: true });
``` ```

2
packages/core/src/canvas/index.ts

@ -574,7 +574,7 @@ export default class CanvasModule extends Module<CanvasConfig> {
* const selected = editor.getSelected(); * const selected = editor.getSelected();
* // Scroll smoothly (this behavior can be polyfilled) * // Scroll smoothly (this behavior can be polyfilled)
* canvas.scrollTo(selected, { behavior: 'smooth' }); * canvas.scrollTo(selected, { behavior: 'smooth' });
* // Force the scroll, even if the element is alredy visible * // Force the scroll, even if the element is already visible
* canvas.scrollTo(selected, { force: true }); * canvas.scrollTo(selected, { force: true });
*/ */
scrollTo(el: any, opts = {}) { scrollTo(el: any, opts = {}) {

2
packages/core/src/canvas/types.ts

@ -127,7 +127,7 @@ export enum CanvasEvents {
frameLoad = 'canvas:frame:load', frameLoad = 'canvas:frame:load',
/** /**
* @event `canvas:frame:load:head` Frame head loaded in canvas. The event is triggered right after iframe's finished to load the head elemenets (eg. scripts) * @event `canvas:frame:load:head` Frame head loaded in canvas. The event is triggered right after iframe's finished to load the head elements (eg. scripts)
* @example * @example
* editor.on('canvas:frame:load:head', ({ window }) => { * editor.on('canvas:frame:load:head', ({ window }) => {
* console.log('Frame head loaded', window); * console.log('Frame head loaded', window);

2
packages/core/src/css_composer/view/CssRulesView.ts

@ -60,7 +60,7 @@ export default class CssRulesView extends View {
// I have to render keyframes of the same name together // I have to render keyframes of the same name together
// Unfortunately at the moment I didn't find the way of appending them // Unfortunately at the moment I didn't find the way of appending them
// if not staticly, via appendData // if not statically, via appendData
if (model.get('atRuleType') === 'keyframes') { if (model.get('atRuleType') === 'keyframes') {
const atRule = model.getAtRule(); const atRule = model.getAtRule();
let atRuleEl = this.atRules[atRule]; let atRuleEl = this.atRules[atRule];

2
packages/core/src/dom_components/view/ComponentTextView.ts

@ -160,7 +160,7 @@ export default class ComponentTextView<TComp extends ComponentText = ComponentTe
const contentOpt: ObjectAny = { fromDisable: 1, ...opts }; const contentOpt: ObjectAny = { fromDisable: 1, ...opts };
model.set('content', '', contentOpt); model.set('content', '', contentOpt);
// If there is a custom RTE the content is just added staticly // If there is a custom RTE the content is just added statically
// inside 'content' // inside 'content'
if (rte?.customRte && !rte.customRte.parseContent) { if (rte?.customRte && !rte.customRte.parseContent) {
comps.length && comps.length &&

Loading…
Cancel
Save