Skip to content

Commit

Permalink
rename function to get plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
epodivilov committed May 20, 2024
1 parent 3d6798a commit be87fcf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/js/page/ui/settings.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createNanoEvents } from 'nanoevents';
import { collectPlugins } from '../../utils/settings.js';
import { getActivePlugins } from '../../utils/settings.js';
import { domReady } from '../utils.js';
import MaterialSlider from './material-slider.js';
import Ripple from './ripple.js';
Expand Down Expand Up @@ -104,7 +104,7 @@ export default class Settings {
_onUpdateExportLink() {
const { fingerprint, multipass, pretty, ...settings } = this.getSettings();

const plugins = collectPlugins(settings);
const plugins = getActivePlugins(settings);

const svgoConfig = {
multipass,
Expand Down
4 changes: 2 additions & 2 deletions src/js/svgo-worker/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { optimize } from 'svgo/dist/svgo.browser.js';
import { collectPlugins } from '../utils/settings.js';
import { getActivePlugins } from '../utils/settings.js';

const createDimensionsExtractor = () => {
const dimensions = {};
Expand Down Expand Up @@ -35,7 +35,7 @@ const createDimensionsExtractor = () => {

function compress(svgInput, settings) {
// setup plugin list
const plugins = collectPlugins(settings);
const plugins = getActivePlugins(settings);

// multipass optimization
const [dimensions, extractDimensionsPlugin] = createDimensionsExtractor();
Expand Down
2 changes: 1 addition & 1 deletion src/js/utils/settings.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export function collectPlugins(settings) {
export function getActivePlugins(settings) {
const floatPrecision = Number(settings.floatPrecision);
const transformPrecision = Number(settings.transformPrecision);
const plugins = [];
Expand Down

0 comments on commit be87fcf

Please sign in to comment.