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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with
6 additions and
6 deletions
-
docs/api/canvas.md
-
packages/core/src/canvas/index.ts
-
packages/core/src/canvas/types.ts
-
packages/core/src/css_composer/view/CssRulesView.ts
-
packages/core/src/dom_components/view/ComponentTextView.ts
|
|
|
@ -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 |
|
|
|
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(); |
|
|
|
// Scroll smoothly (this behavior can be polyfilled) |
|
|
|
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 }); |
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
@ -574,7 +574,7 @@ export default class CanvasModule extends Module<CanvasConfig> { |
|
|
|
* const selected = editor.getSelected(); |
|
|
|
* // Scroll smoothly (this behavior can be polyfilled)
|
|
|
|
* 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 }); |
|
|
|
*/ |
|
|
|
scrollTo(el: any, opts = {}) { |
|
|
|
|
|
|
|
@ -127,7 +127,7 @@ export enum CanvasEvents { |
|
|
|
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 |
|
|
|
* editor.on('canvas:frame:load:head', ({ window }) => { |
|
|
|
* console.log('Frame head loaded', window); |
|
|
|
|
|
|
|
@ -60,7 +60,7 @@ export default class CssRulesView extends View { |
|
|
|
|
|
|
|
// I have to render keyframes of the same name together
|
|
|
|
// 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') { |
|
|
|
const atRule = model.getAtRule(); |
|
|
|
let atRuleEl = this.atRules[atRule]; |
|
|
|
|
|
|
|
@ -160,7 +160,7 @@ export default class ComponentTextView<TComp extends ComponentText = ComponentTe |
|
|
|
const contentOpt: ObjectAny = { fromDisable: 1, ...opts }; |
|
|
|
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'
|
|
|
|
if (rte?.customRte && !rte.customRte.parseContent) { |
|
|
|
comps.length && |
|
|
|
|