A wired example of Canvas be cut off by very long .clip() path
Discussion can be found at StackOverflow.
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
| ;; | |
| ;; 作者:hijiangtao | |
| ;; 日期:2026年3月24日 | |
| ;; 剑名: 墨澜出版社·圆桌创作会 | |
| ;; 剑意: 构建一个以"共创佳作"为目标的结构化小说创作框架。该框架由一位经验 | |
| ;; 丰富的总编辑进行引导,召集出版社各职能角色(策划编辑、文学编辑、 | |
| ;; 故事架构师)以及多位风格迥异的签约作家,围绕用户给定的故事情节设定, | |
| ;; 进行一场高强度的、即时响应式的深度创作研讨。总编辑将在每轮总结时 | |
| ;; 生成视觉化的故事结构图(ASCII Chart),通过"创意碰撞"与"协同打磨", |
| function getFiberInstance(dom: HTMLElement, traverseUp = 0) { | |
| const key = Object.keys(dom).find((key) => { | |
| return ( | |
| key.startsWith("__reactFiber$") || // react 17+ | |
| key.startsWith("__reactInternalInstance$") | |
| ) // react <17 | |
| }) | |
| const domFiber = dom[key] | |
| if (domFiber == null) return null |
| import { useState }from 'react' | |
| function SwitchComponent() { | |
| const Switch = props => { | |
| const { key, children } = props | |
| return children.find(child => { | |
| return child.props.value === key | |
| }) | |
| } |
| <app-ux-text-card | |
| [data]="[ | |
| { | |
| name: data.name, | |
| value: data.value | |
| } | |
| ]" | |
| > | |
| </app-ux-text-card> |
A wired example of Canvas be cut off by very long .clip() path
Discussion can be found at StackOverflow.
| import { Injectable } from '@angular/core'; | |
| import { Actions, createEffect, ofType } from '@ngrx/effects'; | |
| import { EMPTY } from 'rxjs'; | |
| import { map, mergeMap, catchError } from 'rxjs/operators'; | |
| import { MoviesService } from './movies.service'; | |
| @Injectable() | |
| export class MovieEffects { | |
| loadMovies$ = createEffect(() => this.actions$.pipe( |
| import { NgModule } from '@angular/core'; | |
| import { Routes, RouterModule } from '@angular/router'; | |
| import { HelloPageComponent } from './pages/hello/hello.component'; | |
| const routes: Routes = [ | |
| { | |
| path: 'hello', | |
| pathMatch: 'full', | |
| component: HelloPageComponent |
| import {Component, Input} from '@angular/core' | |
| import { | |
| FormControl, | |
| FormGroup, | |
| ControlValueAccessor, | |
| NG_VALUE_ACCESSOR, | |
| FormBuilder, | |
| Validator | |
| } from '@angular/forms'; |
| /** @jsx createElement */ | |
| import { createElement, useEffect, useState } from 'rax'; | |
| import View from 'rax-view'; | |
| export default function App() { | |
| const [stateParent, setStateParent] = useState(true); | |
| const [stateChild, setStateChild] = useState(true); | |
| useEffect(() => { | |
| setStateChild(!stateChild); |
| function compose(...funcs) { | |
| if (funcs.length === 0) { | |
| return arg => arg | |
| } | |
| if (funcs.length === 1) { | |
| return funcs[0] | |
| } | |
| return funcs.reduce((a, b) => (...args) => a(b(...args))); |